From 3b29da1c015805c8ae36e0a01adb84bf9c62d888 Mon Sep 17 00:00:00 2001 From: kittapath Date: Fri, 6 Dec 2024 10:06:45 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=20error=20api=20key?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/ApiKeyController.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controllers/ApiKeyController.ts b/src/controllers/ApiKeyController.ts index 8fa2ae4f..ce9e312d 100644 --- a/src/controllers/ApiKeyController.ts +++ b/src/controllers/ApiKeyController.ts @@ -149,8 +149,8 @@ export class ApiKeyController extends Controller { const apiName = await this.apiNameRepository.findOne({ where: { id: requestBody.apiNameId }, }); - if (apiName) - throw new HttpError(HttpStatusCode.NOT_FOUND, "ไท้พบรายการ Web Service นี้ในระบบ"); + if (!apiName) + throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบรายการ Web Service นี้ในระบบ"); } const apiHistory = await AppDataSource.getRepository(ApiHistory) .createQueryBuilder("apiHistory")