From 2c7daf8f0ee4d1807abbd4eecc1e29ed4bb99ae7 Mon Sep 17 00:00:00 2001 From: tamaina Date: Sun, 12 Sep 2021 22:57:23 +0900 Subject: [PATCH] page --- src/models/repositories/page.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/models/repositories/page.ts b/src/models/repositories/page.ts index 1a61e2c99c..3a3642d7ec 100644 --- a/src/models/repositories/page.ts +++ b/src/models/repositories/page.ts @@ -1,19 +1,17 @@ import { EntityRepository, Repository } from 'typeorm'; import { Page } from '@/models/entities/page'; -import { SchemaType } from '@/misc/schema'; +import { Packed } from '@/misc/schema'; import { Users, DriveFiles, PageLikes } from '../index'; import { awaitAll } from '@/prelude/await-all'; import { DriveFile } from '@/models/entities/drive-file'; import { User } from '@/models/entities/user'; -export type PackedPage = SchemaType; - @EntityRepository(Page) export class PageRepository extends Repository { public async pack( src: Page['id'] | Page, me?: { id: User['id'] } | null | undefined, - ): Promise { + ): Promise> { const meId = me ? me.id : null; const page = typeof src === 'object' ? src : await this.findOneOrFail(src);