mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-05 12:25:54 +02:00
Refactor
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user