fix code quality issues
This commit is contained in:
parent
8aa76868b3
commit
d8d2188b4d
10 changed files with 12 additions and 34 deletions
|
@ -22,12 +22,12 @@ import { IdService } from '@/core/IdService.js';
|
|||
import { NotificationService } from '@/core/NotificationService.js';
|
||||
import { Serialized } from '@/types.js';
|
||||
import { ReversiGameEntityService } from './entities/ReversiGameEntityService.js';
|
||||
import type { OnApplicationShutdown, OnModuleInit } from '@nestjs/common';
|
||||
import type { OnModuleInit } from '@nestjs/common';
|
||||
|
||||
const MATCHING_TIMEOUT_MS = 1000 * 15; // 15sec
|
||||
|
||||
@Injectable()
|
||||
export class ReversiService implements OnApplicationShutdown, OnModuleInit {
|
||||
export class ReversiService implements OnModuleInit {
|
||||
private notificationService: NotificationService;
|
||||
|
||||
constructor(
|
||||
|
@ -543,13 +543,4 @@ export class ReversiService implements OnApplicationShutdown, OnModuleInit {
|
|||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@bindThis
|
||||
public dispose(): void {
|
||||
}
|
||||
|
||||
@bindThis
|
||||
public onApplicationShutdown(signal?: string | undefined): void {
|
||||
this.dispose();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,8 +38,8 @@ export class ReversiGameEntityService {
|
|||
return await awaitAll({
|
||||
id: game.id,
|
||||
createdAt: game.createdAt.toISOString(),
|
||||
startedAt: game.startedAt && game.startedAt.toISOString(),
|
||||
endedAt: game.endedAt && game.endedAt.toISOString(),
|
||||
startedAt: game.startedAt?.toISOString() ?? null,
|
||||
endedAt: game.endedAt?.toISOString() ?? null,
|
||||
isStarted: game.isStarted,
|
||||
isEnded: game.isEnded,
|
||||
form1: game.form1,
|
||||
|
@ -90,8 +90,8 @@ export class ReversiGameEntityService {
|
|||
return await awaitAll({
|
||||
id: game.id,
|
||||
createdAt: game.createdAt.toISOString(),
|
||||
startedAt: game.startedAt && game.startedAt.toISOString(),
|
||||
endedAt: game.endedAt && game.endedAt.toISOString(),
|
||||
startedAt: game.startedAt?.toISOString() ?? null,
|
||||
endedAt: game.endedAt?.toISOString() ?? null,
|
||||
isStarted: game.isStarted,
|
||||
isEnded: game.isEnded,
|
||||
user1Id: game.user1Id,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue