chore: add ticket module and tickets entity
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user