chore: add ticket module and tickets entity

This commit is contained in:
mahyargdz
2025-01-22 17:03:46 +03:30
parent c48ec70638
commit e3762c1eba
16 changed files with 166 additions and 27 deletions
+4 -4
View File
@@ -1,7 +1,7 @@
import { BadRequestException, Injectable, Logger } from "@nestjs/common";
import { TokensService } from "./tokens.service";
import { AuthMessage, CommonMessage, UserMessage } from "../../../common/enums/message.enum";
import { AuthMessage, UserMessage } from "../../../common/enums/message.enum";
import { UsersService } from "../../users/providers/users.service";
import { OTPService } from "../../utils/providers/otp.service";
import { PasswordService } from "../../utils/providers/password.service";
@@ -34,7 +34,7 @@ export class AuthService {
}
const otpCode = await this.otpService.generateAndSetInCache(phone, "REGISTER");
// await SmsService.sendOtp(phone, otpCode);
this.logger.log(`OTP sent to ${phone}: ${otpCode}`);
this.logger.debug(`OTP sent to ${phone}: ${otpCode}`);
return {
message: AuthMessage.OTP_SENT,
@@ -82,7 +82,7 @@ export class AuthService {
async checkUserExist(checkUserExistDto: CheckUserExistDto) {
const user = await this.usersService.findOneWithEmail(checkUserExistDto.email);
if (!user) throw new BadRequestException(UserMessage.USER_NOT_FOUND);
return { message: CommonMessage.USER_EXIST };
return { message: UserMessage.USER_EXISTS };
}
//****************** */
@@ -102,7 +102,7 @@ export class AuthService {
const otpCode = await this.otpService.generateAndSetInCache(phone, "LOGIN");
// await SmsService.sendOtp(phone, otpCode);
this.logger.log(`OTP sent to ${phone}: ${otpCode}`);
this.logger.debug(`OTP sent to ${phone}: ${otpCode}`);
return {
message: AuthMessage.OTP_SENT,