mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-27 08:10:24 +01:00
blocking
This commit is contained in:
parent
b98687244d
commit
3d54fb24d5
1 changed files with 2 additions and 4 deletions
|
@ -2,17 +2,15 @@ import { EntityRepository, Repository } from 'typeorm';
|
|||
import { Users } from '../index';
|
||||
import { Blocking } from '@/models/entities/blocking';
|
||||
import { awaitAll } from '@/prelude/await-all';
|
||||
import { SchemaType } from '@/misc/schema';
|
||||
import { Packed } from '@/misc/schema';
|
||||
import { User } from '@/models/entities/user';
|
||||
|
||||
export type PackedBlocking = SchemaType<typeof packedBlockingSchema>;
|
||||
|
||||
@EntityRepository(Blocking)
|
||||
export class BlockingRepository extends Repository<Blocking> {
|
||||
public async pack(
|
||||
src: Blocking['id'] | Blocking,
|
||||
me?: { id: User['id'] } | null | undefined
|
||||
): Promise<PackedBlocking> {
|
||||
): Promise<Packed<'Blocking'>> {
|
||||
const blocking = typeof src === 'object' ? src : await this.findOneOrFail(src);
|
||||
|
||||
return await awaitAll({
|
||||
|
|
Loading…
Reference in a new issue