This commit is contained in:
syuilo
2017-03-09 03:50:09 +09:00
parent 3d536ddb3f
commit 31f36fa618
64 changed files with 241 additions and 256 deletions

View File

@@ -1,7 +1,7 @@
/**
* Module dependencies
*/
import it from 'cafy';
import $ from 'cafy';
import DriveFile from '../../../models/drive-file';
import serialize from '../../../serializers/drive-file';
@@ -14,7 +14,7 @@ import serialize from '../../../serializers/drive-file';
*/
module.exports = (params, user) => new Promise(async (res, rej) => {
// Get 'file_id' parameter
const [fileId, fileIdErr] = it(params.file_id).expect.id().required().get();
const [fileId, fileIdErr] = $(params.file_id).id().$;
if (fileIdErr) return rej('invalid file_id param');
// Fetch file