Skip to content

Commit

Permalink
Change structure of serialized filters
Browse files Browse the repository at this point in the history
  • Loading branch information
kum-deepak committed Jan 5, 2021
1 parent 3117e64 commit e3f8de8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const data = loadAndProcessData('src/ndx.csv');
const adaptor = creatAdapter(data);

app.post('/api/stock', (req, res) => {
adaptor.filterStorage.restore(req.body);
adaptor.filterStorage.restore(req.body.filters);
console.log(`${adaptor.groupAll.value()} of ${adaptor.cf.size()}`);
const result = adaptor.computeChartData();
res.json(result);
Expand Down
2 changes: 1 addition & 1 deletion src/remote/remote-data-source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export class RemoteDataSource {
'Content-Type': 'application/json',
},
redirect: 'follow',
body: JSON.stringify(serializedFilters),
body: JSON.stringify({ filters: serializedFilters }),
});
const txtBody = await response.text();
return JSON.parse(txtBody, dateTimeReviver);
Expand Down

0 comments on commit e3f8de8

Please sign in to comment.