Refactor
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user