fix lint errors
This commit is contained in:
parent
74f7cd6e31
commit
30ff29afc7
|
|
@ -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'),
|
||||
|
|
|
|||
Loading…
Reference in New Issue