From 258ca29be7db3e2cac3311d5ee00924f3aa6d7d3 Mon Sep 17 00:00:00 2001 From: Julien Oculi Date: Thu, 4 Jul 2024 14:27:19 +0200 Subject: [PATCH] chore(config): :clown_face: change db mock path --- src/db/mod.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/db/mod.ts b/src/db/mod.ts index eaf87c9..af354e4 100644 --- a/src/db/mod.ts +++ b/src/db/mod.ts @@ -1,13 +1,15 @@ import { Db, Group } from '@cohabit/ressources_manager/mod.ts' // Import Datas -import groups from './mock/groups.json' with { type: 'json' } -import users from './mock/users.json' with { type: 'json' } +import { exists } from '$std/fs/exists.ts' +import { ensureDir } from '$std/fs/mod.ts' import { User } from '@cohabit/ressources_manager/src/models/mod.ts' import { MailAddress } from '@cohabit/ressources_manager/types.ts' -import { exists } from '$std/fs/exists.ts' +import groups from ":src/db/mock/groups.json" with { type: 'json' } +import users from ":src/db/mock/users.json" with { type: 'json' } -const dbPath = './_fresh/db.sqlite' +await ensureDir('./cache') +const dbPath = './cache/db.sqlite' const dbExist = await exists(dbPath) export const db = await Db.init(dbPath)