Updating path to sqlite db file

This commit is contained in:
Collin Duncan 2023-02-10 19:08:41 +01:00
parent 6257ce0d38
commit 3bef2a8819
No known key found for this signature in database

View file

@ -4,7 +4,7 @@ import { asyncLocalStorage } from '../logger'
import { CREATE_TABLE_reservations } from './sql'
export const run = async (sql: string, params?: unknown) => {
const db = new sqlite.Database(resolve('autobaan_db'))
const db = new sqlite.Database(resolve('./db/autobaan_db'))
await new Promise<void>((res, rej) => {
asyncLocalStorage.getStore()?.debug(`<database> run ${sql} (${params})`)
db.run(sql, params, (err) => {