そもそもPacked<'...'>は常にSerializedである
This commit is contained in:
parent
4a104af304
commit
edc38fc2c7
25 changed files with 78 additions and 100 deletions
|
|
@ -23,7 +23,7 @@ export class BlockingEntityService {
|
|||
public async pack(
|
||||
src: Blocking['id'] | Blocking,
|
||||
me?: { id: User['id'] } | null | undefined,
|
||||
): Promise<Serialized<Packed<'Blocking'>>> {
|
||||
): Promise<Packed<'Blocking'>> {
|
||||
const blocking = typeof src === 'object' ? src : await this.blockingsRepository.findOneByOrFail({ id: src });
|
||||
|
||||
return await awaitAll({
|
||||
|
|
@ -40,7 +40,7 @@ export class BlockingEntityService {
|
|||
public packMany(
|
||||
blockings: any[],
|
||||
me: { id: User['id'] },
|
||||
): Promise<Serialized<Packed<'Blocking'>>[]> {
|
||||
): Promise<Packed<'Blocking'>[]> {
|
||||
return Promise.all(blockings.map(x => this.pack(x, me)));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue