From 0e5cf4f69a87a9bb8bbd0b4ddbf3d248dd8937a2 Mon Sep 17 00:00:00 2001 From: waruneeauy Date: Wed, 13 Aug 2025 10:35:07 +0700 Subject: [PATCH] fix api manage list response system --- src/controllers/ApiManageController.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/controllers/ApiManageController.ts b/src/controllers/ApiManageController.ts index 66fd875f..6a6e4247 100644 --- a/src/controllers/ApiManageController.ts +++ b/src/controllers/ApiManageController.ts @@ -368,6 +368,7 @@ export class ApiManageController extends Controller { if (system) { queryBuilder.andWhere("apiName.system = :system", { system }); } + // console.log("query ===> ", queryBuilder.getQuery()); const [apiNames, total] = await queryBuilder .skip(offset) @@ -377,7 +378,10 @@ export class ApiManageController extends Controller { .getManyAndCount(); return new HttpSuccess({ - data: apiNames, + data: apiNames.map((api) => ({ + ...api, + system: this.systems.find((s) => s.code === api.system)?.name || api.system, + })), total, }); } catch (error) {