mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-27 08:10:24 +01:00
emoji
This commit is contained in:
parent
c71844c292
commit
77ed1d7dc4
1 changed files with 2 additions and 4 deletions
|
@ -1,14 +1,12 @@
|
|||
import { EntityRepository, Repository } from 'typeorm';
|
||||
import { Emoji } from '@/models/entities/emoji';
|
||||
import { SchemaType } from '@/misc/schema';
|
||||
|
||||
export type PackedEmoji = SchemaType<typeof packedEmojiSchema>;
|
||||
import { Packed } from '@/misc/schema';
|
||||
|
||||
@EntityRepository(Emoji)
|
||||
export class EmojiRepository extends Repository<Emoji> {
|
||||
public async pack(
|
||||
src: Emoji['id'] | Emoji,
|
||||
): Promise<PackedEmoji> {
|
||||
): Promise<Packed<'Emoji'>> {
|
||||
const emoji = typeof src === 'object' ? src : await this.findOneOrFail(src);
|
||||
|
||||
return {
|
||||
|
|
Loading…
Reference in a new issue