From 7bc788fc57519cdda7d91016a2a67c6e141dfb59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?syuilo=E2=AD=90=EF=B8=8F?= Date: Tue, 24 Jan 2017 21:44:30 +0900 Subject: [PATCH] [API] Fix bu --- src/api/common/add-file-to-drive.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/api/common/add-file-to-drive.ts b/src/api/common/add-file-to-drive.ts index 76ca6c913..7754c1e2c 100644 --- a/src/api/common/add-file-to-drive.ts +++ b/src/api/common/add-file-to-drive.ts @@ -110,7 +110,7 @@ export default ( } // Create DriveFile document - const res = await DriveFile.insert({ + const file = await DriveFile.insert({ created_at: new Date(), user_id: user._id, folder_id: folder !== null ? folder._id : null, @@ -123,8 +123,6 @@ export default ( properties: properties }); - const file = res.ops[0]; - resolve(file); // Serialize