1
0
This commit is contained in:
syuilo
2019-04-25 13:27:07 +09:00
parent 6721d27e3f
commit 4cb58c0892
10 changed files with 84 additions and 84 deletions
+11 -11
View File
@@ -67,17 +67,6 @@ export class DriveFileRepository extends Repository<DriveFile> {
return parseInt(sum, 10) || 0;
}
public packMany(
files: any[],
options?: {
detail?: boolean
self?: boolean,
withUser?: boolean,
}
) {
return Promise.all(files.map(f => this.pack(f, options)));
}
public async pack(
src: DriveFile['id'] | DriveFile,
options?: {
@@ -111,6 +100,17 @@ export class DriveFileRepository extends Repository<DriveFile> {
user: opts.withUser ? Users.pack(file.userId!) : null
});
}
public packMany(
files: any[],
options?: {
detail?: boolean
self?: boolean,
withUser?: boolean,
}
) {
return Promise.all(files.map(f => this.pack(f, options)));
}
}
export const packedDriveFileSchema = {