diff options
Diffstat (limited to 'src/models/repositories/notification.ts')
| -rw-r--r-- | src/models/repositories/notification.ts | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/models/repositories/notification.ts b/src/models/repositories/notification.ts index b7f9e3643c..d1cf9b087e 100644 --- a/src/models/repositories/notification.ts +++ b/src/models/repositories/notification.ts @@ -2,15 +2,13 @@ import { EntityRepository, In, Repository } from 'typeorm'; import { Users, Notes, UserGroupInvitations, AccessTokens, NoteReactions } from '../index'; import { Notification } from '@/models/entities/notification'; import { awaitAll } from '@/prelude/await-all'; -import { SchemaType } from '@/misc/schema'; +import { Packed } from '@/misc/schema'; import { Note } from '@/models/entities/note'; import { NoteReaction } from '@/models/entities/note-reaction'; import { User } from '@/models/entities/user'; import { aggregateNoteEmojis, prefetchEmojis } from '@/misc/populate-emojis'; import { notificationTypes } from '@/types'; -export type PackedNotification = SchemaType<typeof packedNotificationSchema>; - @EntityRepository(Notification) export class NotificationRepository extends Repository<Notification> { public async pack( @@ -20,7 +18,7 @@ export class NotificationRepository extends Repository<Notification> { myReactions: Map<Note['id'], NoteReaction | null>; }; } - ): Promise<PackedNotification> { + ): Promise<Packed<'Notification'>> { const notification = typeof src === 'object' ? src : await this.findOneOrFail(src); const token = notification.appAccessTokenId ? await AccessTokens.findOneOrFail(notification.appAccessTokenId) : null; |