そもそもPacked<'...'>は常にSerializedである

This commit is contained in:
tamaina
2023-06-04 18:39:39 +00:00
parent 4a104af304
commit edc38fc2c7
25 changed files with 78 additions and 100 deletions

View File

@@ -3,7 +3,6 @@ import { DI } from '@/di-symbols.js';
import type { MutingsRepository } from '@/models/index.js';
import { awaitAll } from '@/misc/prelude/await-all.js';
import type { Packed } from 'misskey-js';
import type { Serialized } from 'schema-type';
import type { User } from '@/models/entities/User.js';
import type { Muting } from '@/models/entities/Muting.js';
import { bindThis } from '@/decorators.js';
@@ -23,7 +22,7 @@ export class MutingEntityService {
public async pack(
src: Muting['id'] | Muting,
me?: { id: User['id'] } | null | undefined,
): Promise<Serialized<Packed<'Muting'>>> {
): Promise<Packed<'Muting'>> {
const muting = typeof src === 'object' ? src : await this.mutingsRepository.findOneByOrFail({ id: src });
return await awaitAll({