fix lint errors

This commit is contained in:
niztal 2024-01-28 23:49:42 +02:00
parent 74f7cd6e31
commit 30ff29afc7
1 changed files with 5 additions and 5 deletions

View File

@ -11,14 +11,14 @@ import { postgresMigrations } from './database/migrations/postgres'
let appDataSource: DataSource
export const init = async (): Promise<void> => {
let homePath;
let flowisePath = path.join(getUserHome(), '.flowise');
let homePath
let flowisePath = path.join(getUserHome(), '.flowise')
if (!fs.existsSync(flowisePath)) {
fs.mkdirSync(flowisePath);
fs.mkdirSync(flowisePath)
}
switch (process.env.DATABASE_TYPE) {
case 'sqlite':
homePath = process.env.DATABASE_PATH ?? flowisePath;
homePath = process.env.DATABASE_PATH ?? flowisePath
appDataSource = new DataSource({
type: 'sqlite',
database: path.resolve(homePath, 'database.sqlite'),
@ -59,7 +59,7 @@ export const init = async (): Promise<void> => {
})
break
default:
homePath = process.env.DATABASE_PATH ?? flowisePath;
homePath = process.env.DATABASE_PATH ?? flowisePath
appDataSource = new DataSource({
type: 'sqlite',
database: path.resolve(homePath, 'database.sqlite'),