From 3ddaa092119b1100d976e4c1cfaa42da43070205 Mon Sep 17 00:00:00 2001 From: Kallesh B S Date: Mon, 9 Jun 2025 09:52:30 +0530 Subject: [PATCH] login dto updated --- src/auth/auth.dto.ts | 15 +++++++++++++-- src/auth/auth.service.ts | 10 +++++----- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/auth/auth.dto.ts b/src/auth/auth.dto.ts index 181584e..daaa5a3 100644 --- a/src/auth/auth.dto.ts +++ b/src/auth/auth.dto.ts @@ -1,12 +1,23 @@ import { ApiProperty } from '@nestjs/swagger'; import { IsString } from 'class-validator'; +// export class AuthLoginDTO { +// @ApiProperty({ required: true }) +// @IsString() +// p_emailaddr: string; + +// @ApiProperty({ required: true }) +// @IsString() +// p_password: string; +// } + export class AuthLoginDTO { @ApiProperty({ required: true }) @IsString() - p_emailaddr: string; + P_EMAILADDR: string; @ApiProperty({ required: true }) @IsString() - p_password: string; + P_PASSWORD: string; } + diff --git a/src/auth/auth.service.ts b/src/auth/auth.service.ts index aabcea9..75b11c8 100644 --- a/src/auth/auth.service.ts +++ b/src/auth/auth.service.ts @@ -18,15 +18,15 @@ export class AuthService { const result = await connection.execute( `BEGIN - USERLOGIN_PKG.ValidateUser(:p_emailaddr,:p_password,:p_login_cursor); + USERLOGIN_PKG.ValidateUser(:P_EMAILADDR,:P_PASSWORD,:p_login_cursor); END;`, { - p_emailaddr: { - val: body.p_emailaddr, + P_EMAILADDR: { + val: body.P_EMAILADDR, type: oracledb.DB_TYPE_NVARCHAR, }, - p_password: { - val: body.p_password, + P_PASSWORD: { + val: body.P_PASSWORD, type: oracledb.DB_TYPE_NVARCHAR, }, p_login_cursor: {