From 624b1a062734cc2085e1ffdc4e0b59ef94c2ed89 Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Wed, 12 Jun 2024 13:23:02 +0700 Subject: [PATCH] updated throw --- src/controllers/AuthSysController.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/controllers/AuthSysController.ts b/src/controllers/AuthSysController.ts index 756bd368..f8c58159 100644 --- a/src/controllers/AuthSysController.ts +++ b/src/controllers/AuthSysController.ts @@ -28,9 +28,9 @@ export class AuthSysController extends Controller { @Get("list") public async listAuthSys() { const getList = await this.authSysRepo.find(); - // if (!getList || getList.length === 0) { - // throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล"); - // } + if (!getList || getList.length === 0) { + throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล"); + } return new HttpSuccess(getList); }