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: {