From baf9b658018e6b7d4bc2645eef871e9a57ef23db Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 5 Oct 2018 01:43:47 +0900 Subject: Improve error handling of packaging functions --- src/server/api/endpoints/drive/stream.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/server/api/endpoints/drive/stream.ts') diff --git a/src/server/api/endpoints/drive/stream.ts b/src/server/api/endpoints/drive/stream.ts index a9f3f7e9a5..3ac7dd0234 100644 --- a/src/server/api/endpoints/drive/stream.ts +++ b/src/server/api/endpoints/drive/stream.ts @@ -1,5 +1,5 @@ import $ from 'cafy'; import ID from '../../../../misc/cafy-id'; -import DriveFile, { pack } from '../../../../models/drive-file'; +import DriveFile, { packMany } from '../../../../models/drive-file'; import { ILocalUser } from '../../../../models/user'; export const meta = { @@ -63,5 +63,5 @@ export default (params: any, user: ILocalUser) => new Promise(async (res, rej) = }); // Serialize - res(await Promise.all(files.map(file => pack(file)))); + res(await packMany(files)); }); -- cgit v1.2.3-freya