hotfix: resolve data directory (#288)

This commit is contained in:
Carlos Valente
2023-02-17 20:23:00 +01:00
committed by GitHub
parent 298af3ec5a
commit df351b8cba
3 changed files with 7 additions and 11 deletions
@@ -27,9 +27,8 @@ export const poll = async (req, res) => {
export const dbDownload = async (req, res) => {
const { title } = DataProvider.getEventData();
const fileTitle = title || 'ontime data';
const dbInDisk = resolveDbPath();
res.download(dbInDisk, `${fileTitle}.json`, (err) => {
res.download(resolveDbPath, `${fileTitle}.json`, (err) => {
if (err) {
res.status(500).send({
message: `Could not download the file: ${err}`,