feat: use different db for staging build

This commit is contained in:
Zamitto 2024-09-26 09:30:37 -03:00
parent 25cfdb50d8
commit 24d21b9839

View file

@ -4,7 +4,12 @@ import path from "node:path";
export const defaultDownloadsPath = app.getPath("downloads");
export const databaseDirectory = path.join(app.getPath("appData"), "hydra");
export const databasePath = path.join(databaseDirectory, "hydra.db");
export const databasePath = path.join(
databaseDirectory,
import.meta.env.MAIN_VITE_API_URL.includes("staging")
? "hydra_test.db"
: "hydra.db"
);
export const logsPath = path.join(app.getPath("appData"), "hydra", "logs");