reversi-matching

This commit is contained in:
tamaina 2021-09-12 23:09:17 +09:00
parent 6b72d888f8
commit f8df218bbb
1 changed files with 2 additions and 4 deletions

View File

@ -3,16 +3,14 @@ import { ReversiMatching } from '@/models/entities/games/reversi/matching';
import { Users } from '../../../index';
import { awaitAll } from '@/prelude/await-all';
import { User } from '@/models/entities/user';
import { SchemaType } from '@/misc/schema';
export type PackedReversiMatching = SchemaType<typeof packedReversiMatchingSchema>;
import { Packed } from '@/misc/schema';
@EntityRepository(ReversiMatching)
export class ReversiMatchingRepository extends Repository<ReversiMatching> {
public async pack(
src: ReversiMatching['id'] | ReversiMatching,
me: { id: User['id'] }
): Promise<PackedReversiMatching> {
): Promise<Packed<'ReversiMatching'>> {
const matching = typeof src === 'object' ? src : await this.findOneOrFail(src);
return await awaitAll({