summaryrefslogtreecommitdiff
path: root/src/api/common
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-02-01 09:27:37 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-02-01 09:27:37 +0900
commitac661eacc0864eef3ca273f5b18fa9a0014efe84 (patch)
tree63fcc0a9eb993a31fb253652f29d88025400c34f /src/api/common
parentFix: Add missing semicolon (diff)
downloadsharkey-ac661eacc0864eef3ca273f5b18fa9a0014efe84.tar.gz
sharkey-ac661eacc0864eef3ca273f5b18fa9a0014efe84.tar.bz2
sharkey-ac661eacc0864eef3ca273f5b18fa9a0014efe84.zip
[Server] Remove needless query
Diffstat (limited to 'src/api/common')
-rw-r--r--src/api/common/add-file-to-drive.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/api/common/add-file-to-drive.ts b/src/api/common/add-file-to-drive.ts
index 98f3e9635b..b4e3773c19 100644
--- a/src/api/common/add-file-to-drive.ts
+++ b/src/api/common/add-file-to-drive.ts
@@ -54,11 +54,10 @@ export default (
.digest('hex') as string;
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({
user_id: user._id,
- hash: hash,
- datasize: size
+ hash: hash
});
if (much !== null) {