fix api manage list response system

This commit is contained in:
Warunee Tamkoo 2025-08-13 10:35:07 +07:00
parent b10f17b5dc
commit 0e5cf4f69a

View file

@ -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) {