1
0
mirror of https://github.com/tcgdex/cards-database.git synced 2025-06-14 08:39:17 +00:00

fix: Fixed DB path (#134)

* Fixed path

Signed-off-by: Avior <github@avior.me>

* Fixed Builder

Signed-off-by: Avior <github@avior.me>
This commit is contained in:
2021-11-04 11:51:09 +01:00
committed by GitHub
parent 65e5bdb9ee
commit 40240f2ab9
4 changed files with 4 additions and 4 deletions

View File

@ -21,7 +21,7 @@ export async function getSet(name: string, serie = '*'): Promise<Set> {
if (!setCache[name]) {
try {
const [path] = await smartGlob(`${DB_PATH}/data/${serie}/${name}.js`)
setCache[name] = (await import('../../' + path)).default
setCache[name] = (await import(`../../${path}`)).default
} catch (error) {
console.error(error)
console.error(`Error trying to import importing (${`db/data/${serie}/${name}.js`})`)

View File

@ -7,7 +7,7 @@ interface fileCacheInterface {
[key: string]: any
}
export const DB_PATH = "../../"
export const DB_PATH = "../"
const fileCache: fileCacheInterface = {}