Commit 67ee7b63 authored by nanahira's avatar nanahira

multiple dealers

parent c07f9e93
Pipeline #24770 passed with stages
in 33 seconds
...@@ -2,13 +2,14 @@ import { Injectable, ConsoleLogger } from '@nestjs/common'; ...@@ -2,13 +2,14 @@ import { Injectable, ConsoleLogger } from '@nestjs/common';
import { ConfigService } from '@nestjs/config'; import { ConfigService } from '@nestjs/config';
import { InjectRepository } from '@nestjs/typeorm'; import { InjectRepository } from '@nestjs/typeorm';
import { DuelLogPlayer } from './entities/DuelLogPlayer'; import { DuelLogPlayer } from './entities/DuelLogPlayer';
import { FindOptionsWhere, Not, Repository } from 'typeorm'; import { FindOptionsWhere, In, Not, Repository } from 'typeorm';
import { MatchResultDto } from './dto/match-result.dto'; import { MatchResultDto } from './dto/match-result.dto';
import { GenericReturnMessageDto } from 'nicot'; import { GenericReturnMessageDto } from 'nicot';
@Injectable() @Injectable()
export class AppService extends ConsoleLogger { export class AppService extends ConsoleLogger {
private dealerUsername = this.config.get<string>('DEALER_USERNAME'); private dealerUsername =
this.config.get<string>('DEALER_USERNAME')?.split(',') || [];
constructor( constructor(
private readonly config: ConfigService, private readonly config: ConfigService,
@InjectRepository(DuelLogPlayer) @InjectRepository(DuelLogPlayer)
...@@ -38,7 +39,7 @@ export class AppService extends ConsoleLogger { ...@@ -38,7 +39,7 @@ export class AppService extends ConsoleLogger {
async getDealerMatchResult() { async getDealerMatchResult() {
return await this.getMatchResult({ return await this.getMatchResult({
realName: this.dealerUsername, realName: In(this.dealerUsername),
}); });
} }
......
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