fix(index): fix realm in link to character when using a single realm
This commit is contained in:
parent
88e1d143d1
commit
d0eb86daa7
3 changed files with 5 additions and 5 deletions
|
|
@ -4,6 +4,7 @@ import { Connection, RowDataPacket } from "mysql2/promise";
|
||||||
export interface IResult {
|
export interface IResult {
|
||||||
recordsTotal: number;
|
recordsTotal: number;
|
||||||
recordsFiltered: number;
|
recordsFiltered: number;
|
||||||
|
draw: number;
|
||||||
data: any[][];
|
data: any[][];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -221,6 +222,7 @@ export class DataTablesSsp {
|
||||||
return {
|
return {
|
||||||
recordsTotal,
|
recordsTotal,
|
||||||
recordsFiltered,
|
recordsFiltered,
|
||||||
|
draw: this.draw,
|
||||||
data: rows,
|
data: rows,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -79,10 +79,8 @@ export class IndexController {
|
||||||
const result = await ssp
|
const result = await ssp
|
||||||
.where("`deleteInfos_Account` IS NULL")
|
.where("`deleteInfos_Account` IS NULL")
|
||||||
.run();
|
.run();
|
||||||
|
(result as any).realm = realm.name;
|
||||||
|
|
||||||
res.json({
|
res.json(result);
|
||||||
draw: ssp.draw,
|
|
||||||
...result,
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@
|
||||||
columnDefs: [
|
columnDefs: [
|
||||||
{
|
{
|
||||||
targets: 0,
|
targets: 0,
|
||||||
render: name => `<a href="/character/${$("#select-realm").val()}/${name}">${name}</a>`,
|
render: (name, type, row, meta) => `<a href="/character/${meta.settings.json.realm}/${name}">${name}</a>`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
searchable: false,
|
searchable: false,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue