feat: add user submission functionality

This commit is contained in:
2026-07-05 21:45:45 +03:30
parent afb5045cf0
commit 7b44542ce7
48 changed files with 1459 additions and 55 deletions
+2 -2
View File
@@ -2,7 +2,7 @@ import { HttpStatus, Injectable, UnauthorizedException } from '@nestjs/common';
import { LessThan, MoreThanOrEqual, Repository } from 'typeorm';
import { OTP } from '../entities/otp.entity';
import { InjectRepository } from '@nestjs/typeorm';
import { Cron } from '@nestjs/schedule';
import { Cron, CronExpression } from '@nestjs/schedule';
import { HashingProvider } from '@/common/modules/hashing/providers/hashing.provider';
import { AppException } from '@/common/exceptions/app.exception';
import { AppTimeoutException } from '@/common/exceptions/app-timeout.exception';
@@ -86,7 +86,7 @@ export class OtpService {
return otp;
}
@Cron('0 */10 * * * *')
@Cron(CronExpression.EVERY_10_MINUTES)
public async cleanupExpired(): Promise<void> {
await this.otpRepository.delete({
expiresAt: LessThan(new Date()),