Stockage des constants dans un fichier à part pour tout centraliser

This commit is contained in:
2024-12-08 23:32:57 +01:00
parent a0fd6ca6ab
commit 4a4233925d
4 changed files with 29 additions and 5 deletions

View File

@ -6,6 +6,7 @@ import { PrismaService } from 'src/prisma/prisma.service'
import { QueryPaginationDto } from 'src/common/dto/pagination-query.dto'
import { paginate } from 'src/common/utils/pagination.utils'
import { FilterChallengeActionsDto } from './dto/filter-challenge-action.dto'
import { Constants } from 'src/common/utils/constants.utils'
@Injectable()
export class ChallengeActionsService {
@ -87,7 +88,7 @@ export class ChallengeActionsService {
active: false,
end: now,
penaltyStart: now,
penaltyEnd: new Date(now.getTime() + 30 * 60 * 1000),
penaltyEnd: new Date(now.getTime() + Constants.PENALTY_TIME * 60 * 1000),
}
}
return await this.prisma.challengeAction.update({