mirror of
https://github.com/tcgdex/compiler.git
synced 2025-04-22 18:52:08 +00:00
Fixed old endpoint
Signed-off-by: Avior <florian.bouillon@delta-wings.net>
This commit is contained in:
parent
2ed6377d2d
commit
b524f47a88
@ -1,6 +1,5 @@
|
|||||||
import { getBaseFolder } from "../util"
|
import { getBaseFolder } from "../util"
|
||||||
import Category from '@tcgdex/sdk/interfaces/Category'
|
import Category, { CategorySimple, CategoryList } from '@tcgdex/sdk/interfaces/Category'
|
||||||
import { categorySimple, categoryList } from "./category"
|
|
||||||
import TranslationUtil from "@tcgdex/sdk/TranslationUtil"
|
import TranslationUtil from "@tcgdex/sdk/TranslationUtil"
|
||||||
import { Langs } from "@tcgdex/sdk/interfaces/LangList"
|
import { Langs } from "@tcgdex/sdk/interfaces/LangList"
|
||||||
import { promises as fs } from 'fs'
|
import { promises as fs } from 'fs'
|
||||||
@ -10,7 +9,7 @@ const endpoint = getBaseFolder(lang, "categories")
|
|||||||
|
|
||||||
const btsp = async () => {
|
const btsp = async () => {
|
||||||
|
|
||||||
const list: Array<categorySimple> = []
|
const list: Array<CategorySimple> = []
|
||||||
for (const cat of Object.values(Category)) {
|
for (const cat of Object.values(Category)) {
|
||||||
if (typeof cat !== "number") continue
|
if (typeof cat !== "number") continue
|
||||||
list.push({
|
list.push({
|
||||||
@ -19,7 +18,7 @@ const btsp = async () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const res: categoryList = {
|
const res: CategoryList = {
|
||||||
count: list.length,
|
count: list.length,
|
||||||
list: list
|
list: list
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user