summaryrefslogtreecommitdiff
path: root/src/api
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-02-14 06:42:01 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-02-14 06:42:01 +0900
commita529b51c2d5d690c07e82dd99764a637155b36aa (patch)
tree236b1d363966b6f1e4f9fd092c381eae7928bff5 /src/api
parent[Client] :v: (diff)
downloadsharkey-a529b51c2d5d690c07e82dd99764a637155b36aa.tar.gz
sharkey-a529b51c2d5d690c07e82dd99764a637155b36aa.tar.bz2
sharkey-a529b51c2d5d690c07e82dd99764a637155b36aa.zip
[API] Fix bug
Diffstat (limited to 'src/api')
-rw-r--r--src/api/endpoints/drive.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/api/endpoints/drive.js b/src/api/endpoints/drive.js
index f39019e6ea..00f9be7807 100644
--- a/src/api/endpoints/drive.js
+++ b/src/api/endpoints/drive.js
@@ -3,7 +3,7 @@
/**
* Module dependencies
*/
-import DriveFile from './models/drive-file';
+import DriveFile from '../models/drive-file';
/**
* Get drive information
@@ -16,11 +16,11 @@ module.exports = (params, user) =>
new Promise(async (res, rej) =>
{
// Fetch all files to calculate drive usage
- const files = await DriveFile
- .find({ user_id: user._id }, {
- datasize: true,
- _id: false
- });
+ const files = await DriveFile
+ .find({ user_id: user._id }, {
+ datasize: true,
+ _id: false
+ });
// Calculate drive usage (in byte)
const usage = files.map(file => file.datasize).reduce((x, y) => x + y, 0);