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

View File

@@ -76,17 +76,6 @@ export class NoteRepository extends Repository<Note> {
}
}
public packMany(
notes: (Note['id'] | Note)[],
me?: User['id'] | User | null | undefined,
options?: {
detail?: boolean;
skipHide?: boolean;
}
) {
return Promise.all(notes.map(n => this.pack(n, me, options)));
}
public async pack(
src: Note['id'] | Note,
me?: User['id'] | User | null | undefined,
@@ -214,6 +203,17 @@ export class NoteRepository extends Repository<Note> {
return packed;
}
public packMany(
notes: (Note['id'] | Note)[],
me?: User['id'] | User | null | undefined,
options?: {
detail?: boolean;
skipHide?: boolean;
}
) {
return Promise.all(notes.map(n => this.pack(n, me, options)));
}
}
export const packedNoteSchema = {