diff --git a/src/score/score.entity.ts b/src/score/score.entity.ts index a5321daa56ae78dbe1d54911bf934a37a9b124db..01fb60bf11ad23461f9bba6492b6ebea68c61c45 100644 --- a/src/score/score.entity.ts +++ b/src/score/score.entity.ts @@ -1,11 +1,4 @@ -import { - Entity, - PrimaryGeneratedColumn, - Column, - ManyToOne, - Timestamp, - CreateDateColumn, -} from 'typeorm'; +import { Entity, PrimaryGeneratedColumn, Column, ManyToOne } from 'typeorm'; import { FactionEntity } from '../faction/faction.entity'; @Entity('Score') diff --git a/src/score/score.service.ts b/src/score/score.service.ts index 7ef613d0f554bc61ffe9106e64845eaefe43428f..5587f082b65efea36c465764bbe63a12c784aa93 100644 --- a/src/score/score.service.ts +++ b/src/score/score.service.ts @@ -1,10 +1,4 @@ -import { - Injectable, - HttpException, - HttpStatus, - Logger, - OnModuleInit, -} from '@nestjs/common'; +import { Injectable, HttpException, HttpStatus } from '@nestjs/common'; import { InjectRepository } from '@nestjs/typeorm'; import { Repository } from 'typeorm'; @@ -57,6 +51,7 @@ export class ScoreService { }; } + // function to run on timer tick async scoreTick(gameId) { // get game's flagboxes const flagboxes = await this.flagRepository.find({ game: gameId }); @@ -110,7 +105,6 @@ export class ScoreService { }); //if score was found, put info to scores array if (score.faction) { - let index = await scores.findIndex(i => i.faction === score.faction); scores.push(score); } }),