mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-23 12:39:59 +01:00
[Server] Remove needless query
This commit is contained in:
parent
7822a55f45
commit
07da9ff8b4
@ -54,11 +54,10 @@ export default (
|
|||||||
.digest('hex') as string;
|
.digest('hex') as string;
|
||||||
|
|
||||||
if (!force) {
|
if (!force) {
|
||||||
// Check if there is a file with the same hash and same data size (to be safe)
|
// Check if there is a file with the same hash
|
||||||
const much = await DriveFile.findOne({
|
const much = await DriveFile.findOne({
|
||||||
user_id: user._id,
|
user_id: user._id,
|
||||||
hash: hash,
|
hash: hash
|
||||||
datasize: size
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (much !== null) {
|
if (much !== null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user