refactor: ♻️ simplify db mock
This commit is contained in:
parent
889cf1b34a
commit
23ecb8de39
|
@ -10,9 +10,8 @@ import { existsSync } from '$std/fs/exists.ts'
|
|||
const dbPath = './_fresh/db.sqlite'
|
||||
export const db = await Db.init(dbPath)
|
||||
|
||||
|
||||
//! Temp for demo only
|
||||
if (!sessionStorage.getItem('db-loaded') && !existsSync(dbPath)) {
|
||||
if (!existsSync(dbPath)) {
|
||||
console.log('=============LOAD DB=============')
|
||||
|
||||
// Load groups to DB
|
||||
|
@ -37,6 +36,4 @@ if (!sessionStorage.getItem('db-loaded') && !existsSync(dbPath)) {
|
|||
|
||||
db.ressource.user.set([user])
|
||||
}
|
||||
|
||||
sessionStorage.setItem('db-loaded', 'true')
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue