hashtag
This commit is contained in:
parent
3d54fb24d5
commit
4dfebbd0fe
1 changed files with 2 additions and 4 deletions
|
@ -1,14 +1,12 @@
|
||||||
import { EntityRepository, Repository } from 'typeorm';
|
import { EntityRepository, Repository } from 'typeorm';
|
||||||
import { Hashtag } from '@/models/entities/hashtag';
|
import { Hashtag } from '@/models/entities/hashtag';
|
||||||
import { SchemaType } from '@/misc/schema';
|
import { Packed } from '@/misc/schema';
|
||||||
|
|
||||||
export type PackedHashtag = SchemaType<typeof packedHashtagSchema>;
|
|
||||||
|
|
||||||
@EntityRepository(Hashtag)
|
@EntityRepository(Hashtag)
|
||||||
export class HashtagRepository extends Repository<Hashtag> {
|
export class HashtagRepository extends Repository<Hashtag> {
|
||||||
public async pack(
|
public async pack(
|
||||||
src: Hashtag,
|
src: Hashtag,
|
||||||
): Promise<PackedHashtag> {
|
): Promise<Packed<'Hashtag'>> {
|
||||||
return {
|
return {
|
||||||
tag: src.name,
|
tag: src.name,
|
||||||
mentionedUsersCount: src.mentionedUsersCount,
|
mentionedUsersCount: src.mentionedUsersCount,
|
||||||
|
|
Loading…
Reference in a new issue