This commit is contained in:
2026-03-08 09:24:39 +03:30
parent 98c3e887b2
commit 656964e18d
2 changed files with 17 additions and 5 deletions
+3 -3
View File
@@ -26,7 +26,7 @@ export class AuthService {
private readonly notificationQueue: NotificationQueue,
private readonly smsService: SmsService,
private readonly em: EntityManager,
) {}
) { }
//****************** */
//****************** */
async initiateRegistration(requestOtpDto: RequestOtpDto, businessId: string) {
@@ -140,9 +140,9 @@ export class AuthService {
const otpCode = await this.otpService.generateAndSetInCache(phone, "LOGIN");
//
await this.smsService.sendSmsVerifyCode(phone, otpCode);
// TODO : remove otp
return {
message: AuthMessage.OTP_SENT,
message: AuthMessage.OTP_SENT + otpCode,
};
}
+14 -2
View File
@@ -32,7 +32,19 @@ export class BarnameService {
if (!company) throw new BadRequestException(CompanyMessage.COMPANY_NOT_FOUND);
const bill = this.em.create(Barname,
{ carType, exitAt, origin, plaque, business, description, driverName, driverPhone, company, attachments });
{
carType,
exitAt,
origin,
plaque,
business,
description,
driverName,
driverPhone,
company,
attachments,
status: BarnameStatus.PENDING
});
await this.em.persistAndFlush(bill);
@@ -41,7 +53,7 @@ export class BarnameService {
async updateBarnameAsWatcher(id: string, dto: UpdateBarnameAsWatcherDto, business: Business, role: RoleEnum) {
if(role != RoleEnum.WATCHER){
if (role != RoleEnum.WATCHER) {
throw new ForbiddenException("you are not allowed")
}
const { exitedAt, watcherDescription } = dto;