This commit is contained in:
syuilo 2019-04-25 13:27:07 +09:00
parent 6721d27e3f
commit 4cb58c0892
No known key found for this signature in database
GPG key ID: BDC4C49D06AB9D69
10 changed files with 84 additions and 84 deletions

View file

@ -9,13 +9,6 @@ export type PackedBlocking = SchemaType<typeof packedBlockingSchema>;
@EntityRepository(Blocking)
export class BlockingRepository extends Repository<Blocking> {
public packMany(
blockings: any[],
me: any
) {
return Promise.all(blockings.map(x => this.pack(x, me)));
}
public async pack(
src: Blocking['id'] | Blocking,
me?: any
@ -31,6 +24,13 @@ export class BlockingRepository extends Repository<Blocking> {
})
});
}
public packMany(
blockings: any[],
me: any
) {
return Promise.all(blockings.map(x => this.pack(x, me)));
}
}
export const packedBlockingSchema = {