Refactor
This commit is contained in:
parent
6721d27e3f
commit
4cb58c0892
10 changed files with 84 additions and 84 deletions
|
|
@ -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 = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue