そもそも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 { DriveFilesRepository, PagesRepository, PageLikesRepository } 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 { Page } from '@/models/entities/Page.js';
import type { DriveFile } from '@/models/entities/DriveFile.js';
@@ -32,7 +31,7 @@ export class PageEntityService {
public async pack(
src: Page['id'] | Page,
me?: { id: User['id'] } | null | undefined,
): Promise<Serialized<Packed<'Page'>>> {
): Promise<Packed<'Page'>> {
const meId = me ? me.id : null;
const page = typeof src === 'object' ? src : await this.pagesRepository.findOneByOrFail({ id: src });