The key attribute of the /stats
response should only contain groupBy columns
This commit is contained in:
parent
f050397509
commit
4f437a63ee
1 changed files with 1 additions and 1 deletions
|
@ -28,7 +28,7 @@ class Stats {
|
|||
})
|
||||
).map(({dataValues: data}: any) =>
|
||||
new LocationStats({
|
||||
key: Object.keys(data).reduce((acc, k) => {
|
||||
key: groupBy.reduce((acc, k) => {
|
||||
acc[dbColumnsToProps[k] || k] = data[k];
|
||||
return acc;
|
||||
}, {} as Record<string, any>),
|
||||
|
|
Loading…
Add table
Reference in a new issue