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 PackedMuting = SchemaType<typeof packedMutingSchema>;
|
|||
|
||||
@EntityRepository(Muting)
|
||||
export class MutingRepository extends Repository<Muting> {
|
||||
public packMany(
|
||||
mutings: any[],
|
||||
me: any
|
||||
) {
|
||||
return Promise.all(mutings.map(x => this.pack(x, me)));
|
||||
}
|
||||
|
||||
public async pack(
|
||||
src: Muting['id'] | Muting,
|
||||
me?: any
|
||||
|
|
@ -31,6 +24,13 @@ export class MutingRepository extends Repository<Muting> {
|
|||
})
|
||||
});
|
||||
}
|
||||
|
||||
public packMany(
|
||||
mutings: any[],
|
||||
me: any
|
||||
) {
|
||||
return Promise.all(mutings.map(x => this.pack(x, me)));
|
||||
}
|
||||
}
|
||||
|
||||
export const packedMutingSchema = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue