Commit e8625f21 authored by nanahira's avatar nanahira

Update src/tournament/tournament.service.ts

parent 34be906e
Pipeline #39604 passed with stages
in 1 minute and 6 seconds
...@@ -81,7 +81,8 @@ export class TournamentService extends CrudService(Tournament, { ...@@ -81,7 +81,8 @@ export class TournamentService extends CrudService(Tournament, {
} }
async getTournaments(dto: Partial<Tournament>, user: MycardUser | number) { async getTournaments(dto: Partial<Tournament>, user: MycardUser | number) {
const res = await this.findAll(dto, (qb) => const tmpCls = CrudService(Tournament);
const res = await new tmpCls(this.repo).findAll(dto, (qb) =>
Tournament.extraQueryForUser(user, qb, this.entityAliasName), Tournament.extraQueryForUser(user, qb, this.entityAliasName),
); );
res.data?.forEach((t) => res.data?.forEach((t) =>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment