1
0
This commit is contained in:
syuilo
2019-04-25 13:27:07 +09:00
parent 6721d27e3f
commit 4cb58c0892
10 changed files with 84 additions and 84 deletions
+7 -7
View File
@@ -5,13 +5,6 @@ import { ensure } from '../../prelude/ensure';
@EntityRepository(NoteFavorite)
export class NoteFavoriteRepository extends Repository<NoteFavorite> {
public packMany(
favorites: any[],
me: any
) {
return Promise.all(favorites.map(x => this.pack(x, me)));
}
public async pack(
src: NoteFavorite['id'] | NoteFavorite,
me?: any
@@ -23,4 +16,11 @@ export class NoteFavoriteRepository extends Repository<NoteFavorite> {
note: await Notes.pack(favorite.note || favorite.noteId, me),
};
}
public packMany(
favorites: any[],
me: any
) {
return Promise.all(favorites.map(x => this.pack(x, me)));
}
}