fix(index): fix realm in link to character when using a single realm

This commit is contained in:
Axel Cocat 2022-01-20 19:27:22 +01:00
parent 88e1d143d1
commit d0eb86daa7
3 changed files with 5 additions and 5 deletions

View file

@ -4,6 +4,7 @@ import { Connection, RowDataPacket } from "mysql2/promise";
export interface IResult {
recordsTotal: number;
recordsFiltered: number;
draw: number;
data: any[][];
}
@ -221,6 +222,7 @@ export class DataTablesSsp {
return {
recordsTotal,
recordsFiltered,
draw: this.draw,
data: rows,
};
}

View file

@ -79,10 +79,8 @@ export class IndexController {
const result = await ssp
.where("`deleteInfos_Account` IS NULL")
.run();
(result as any).realm = realm.name;
res.json({
draw: ssp.draw,
...result,
});
res.json(result);
}
}