diff --git a/src/armory/DataTablesSsp.ts b/src/armory/DataTablesSsp.ts
index 942385c..b3bb6af 100644
--- a/src/armory/DataTablesSsp.ts
+++ b/src/armory/DataTablesSsp.ts
@@ -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,
};
}
diff --git a/src/armory/controllers/IndexController.ts b/src/armory/controllers/IndexController.ts
index 4579c62..ebd5476 100644
--- a/src/armory/controllers/IndexController.ts
+++ b/src/armory/controllers/IndexController.ts
@@ -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);
}
}
diff --git a/static/index.html b/static/index.html
index 6db4b3f..79daf1b 100644
--- a/static/index.html
+++ b/static/index.html
@@ -43,7 +43,7 @@
columnDefs: [
{
targets: 0,
- render: name => `${name}`,
+ render: (name, type, row, meta) => `${name}`,
},
{
searchable: false,