mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-21 06:59:09 +00:00
fix: download db path
path changed with folder restructure
This commit is contained in:
@@ -94,7 +94,7 @@ async function parsev1(jsonData) {
|
|||||||
// Returns -
|
// Returns -
|
||||||
export const dbDownload = async (req, res) => {
|
export const dbDownload = async (req, res) => {
|
||||||
const fileTitle = getEventTitle() || 'ontime events';
|
const fileTitle = getEventTitle() || 'ontime events';
|
||||||
const dbFile = path.resolve(__dirname, '../', 'data/db.json');
|
const dbFile = path.resolve(__dirname, '../../', 'data/db.json');
|
||||||
|
|
||||||
res.download(dbFile, `${fileTitle}.json`, (err) => {
|
res.download(dbFile, `${fileTitle}.json`, (err) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
|
|||||||
Reference in New Issue
Block a user