From 9357bbe04d8f1457641a830a8caa796cded8c3a7 Mon Sep 17 00:00:00 2001 From: dev-callgent Date: Thu, 23 May 2024 14:56:58 +0800 Subject: [PATCH] fix: code scanning Signed-off-by: dev-callgent --- src/endpoints/adaptors/builtin/restapi/restapi.controller.ts | 2 +- src/users/users.service.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/endpoints/adaptors/builtin/restapi/restapi.controller.ts b/src/endpoints/adaptors/builtin/restapi/restapi.controller.ts index 44a2cb6..0c0eec5 100644 --- a/src/endpoints/adaptors/builtin/restapi/restapi.controller.ts +++ b/src/endpoints/adaptors/builtin/restapi/restapi.controller.ts @@ -118,7 +118,7 @@ export class RestApiController { @Get('/invoke/result/:requestId') async invokeResult(@Param('requestId') reqId: string) { // FIXME - return reqId; + return null; } /** diff --git a/src/users/users.service.ts b/src/users/users.service.ts index be7c158..262c54f 100644 --- a/src/users/users.service.ts +++ b/src/users/users.service.ts @@ -302,7 +302,7 @@ export class UsersService { const credentials = pwd ? await Utils.hashSalted(pwd) : undefined; if (id) { - if (!(pwd?.length >= 8)) + if (!pwd || pwd?.length < 8) throw new BadRequestException( 'Password should be at least 8 characters', );