mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-27 08:10:24 +01:00
note-reaction
This commit is contained in:
parent
a97fb08af0
commit
1f82a98384
1 changed files with 2 additions and 4 deletions
|
@ -1,18 +1,16 @@
|
|||
import { EntityRepository, Repository } from 'typeorm';
|
||||
import { NoteReaction } from '@/models/entities/note-reaction';
|
||||
import { Users } from '../index';
|
||||
import { SchemaType } from '@/misc/schema';
|
||||
import { Packed } from '@/misc/schema';
|
||||
import { convertLegacyReaction } from '@/misc/reaction-lib';
|
||||
import { User } from '@/models/entities/user';
|
||||
|
||||
export type PackedNoteReaction = SchemaType<typeof packedNoteReactionSchema>;
|
||||
|
||||
@EntityRepository(NoteReaction)
|
||||
export class NoteReactionRepository extends Repository<NoteReaction> {
|
||||
public async pack(
|
||||
src: NoteReaction['id'] | NoteReaction,
|
||||
me?: { id: User['id'] } | null | undefined
|
||||
): Promise<PackedNoteReaction> {
|
||||
): Promise<Packed<'NoteReaction'>> {
|
||||
const reaction = typeof src === 'object' ? src : await this.findOneOrFail(src);
|
||||
|
||||
return {
|
||||
|
|
Loading…
Reference in a new issue