The key attribute of the /stats response should only contain groupBy columns

This commit is contained in:
Fabio Manganiello 2025-04-03 02:36:04 +02:00
parent f050397509
commit 4f437a63ee
Signed by: blacklight
GPG key ID: D90FBA7F76362774

View file

@ -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>),