fix api manage list response system
This commit is contained in:
parent
b10f17b5dc
commit
0e5cf4f69a
1 changed files with 5 additions and 1 deletions
|
|
@ -368,6 +368,7 @@ export class ApiManageController extends Controller {
|
||||||
if (system) {
|
if (system) {
|
||||||
queryBuilder.andWhere("apiName.system = :system", { system });
|
queryBuilder.andWhere("apiName.system = :system", { system });
|
||||||
}
|
}
|
||||||
|
// console.log("query ===> ", queryBuilder.getQuery());
|
||||||
|
|
||||||
const [apiNames, total] = await queryBuilder
|
const [apiNames, total] = await queryBuilder
|
||||||
.skip(offset)
|
.skip(offset)
|
||||||
|
|
@ -377,7 +378,10 @@ export class ApiManageController extends Controller {
|
||||||
.getManyAndCount();
|
.getManyAndCount();
|
||||||
|
|
||||||
return new HttpSuccess({
|
return new HttpSuccess({
|
||||||
data: apiNames,
|
data: apiNames.map((api) => ({
|
||||||
|
...api,
|
||||||
|
system: this.systems.find((s) => s.code === api.system)?.name || api.system,
|
||||||
|
})),
|
||||||
total,
|
total,
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue