diff --git a/apps/server/src/setup.ts b/apps/server/src/setup.ts index 5cca2800b..8485c2a8a 100644 --- a/apps/server/src/setup.ts +++ b/apps/server/src/setup.ts @@ -74,6 +74,10 @@ export const externalsStartDirectory = isProduction ? getAppDataPath() : join(cu //TODO: we only need one when they are all in the same folder export const resolveExternalsDirectory = join(isProduction ? getAppDataPath() : currentDirectory, 'external'); +// project files +export const lastLoadedProjectConfigPath = join(getAppDataPath(), 'config.json'); +export const uploadsFolderPath = join(getAppDataPath(), 'uploads'); + const getLastLoadedProject = () => { try { return JSON.parse(fs.readFileSync(lastLoadedProjectConfigPath, 'utf8')).lastLoadedProject; @@ -91,11 +95,6 @@ const configDbDirectory = lastLoadedProject ? 'uploads' : config.database.direct // path to public db export const resolveDbDirectory = join(testDbStartDirectory, isTest ? config.database.testdb : configDbDirectory); export const resolveDbPath = join(resolveDbDirectory, lastLoadedProject ? lastLoadedProject : config.database.filename); - -// project files -export const lastLoadedProjectConfigPath = join(getAppDataPath(), 'config.json'); -export const uploadsFolderPath = join(getAppDataPath(), 'uploads'); - export const pathToStartDb = isTest ? join(currentDirectory, '../', config.database.testdb, config.database.filename) : join(currentDirectory, '/preloaded-db/', config.database.filename); diff --git a/apps/server/src/utils/sheetUtils.ts b/apps/server/src/utils/sheetUtils.ts index 190ef348b..14ac3cbd3 100644 --- a/apps/server/src/utils/sheetUtils.ts +++ b/apps/server/src/utils/sheetUtils.ts @@ -71,7 +71,7 @@ export function cellRequestFromEvent( }); } else if (typeof event[key] === 'number') { returnRows.push({ - userEnteredValue: { stringValue: millisToString(event[key], true) }, + userEnteredValue: { stringValue: millisToString(event[key]) }, }); } else if (typeof event[key] === 'string') { returnRows.push({