mirror of
https://github.com/tcgdex/cards-database.git
synced 2025-08-04 05:11:58 +00:00
fix: error while compiling on Windows (#846)
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import path from 'node:path'
|
||||
import { Serie, Set, SupportedLanguages } from '../../../interfaces'
|
||||
import { SerieResume, Serie as SerieSingle } from '../../../meta/definitions/api'
|
||||
import { getSets, setToSetSimple } from './setUtil'
|
||||
@@ -17,6 +18,7 @@ export async function isSerieAvailable(serie: Serie, lang: SupportedLanguages):
|
||||
|
||||
export async function getSeries(lang: SupportedLanguages): Promise<Array<Serie>> {
|
||||
let series: Array<Serie> = (await Promise.all((await smartGlob(`${DB_PATH}/${getDataFolder(lang)}/*.ts`))
|
||||
.map((it) => it.replaceAll(path.sep, '/'))
|
||||
// Find Serie's name
|
||||
.map((it) => it.substring(it.lastIndexOf('/') + 1, it.length - 3))
|
||||
// Fetch the Serie
|
||||
|
Reference in New Issue
Block a user