From b524f47a883659ef1379540d7a9e420de51122dc Mon Sep 17 00:00:00 2001 From: Avior Date: Wed, 11 Mar 2020 11:36:26 +0100 Subject: [PATCH] Fixed old endpoint Signed-off-by: Avior --- endpoints/categories/index.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/endpoints/categories/index.ts b/endpoints/categories/index.ts index 922f631..b06b30e 100644 --- a/endpoints/categories/index.ts +++ b/endpoints/categories/index.ts @@ -1,6 +1,5 @@ import { getBaseFolder } from "../util" -import Category from '@tcgdex/sdk/interfaces/Category' -import { categorySimple, categoryList } from "./category" +import Category, { CategorySimple, CategoryList } from '@tcgdex/sdk/interfaces/Category' import TranslationUtil from "@tcgdex/sdk/TranslationUtil" import { Langs } from "@tcgdex/sdk/interfaces/LangList" import { promises as fs } from 'fs' @@ -10,7 +9,7 @@ const endpoint = getBaseFolder(lang, "categories") const btsp = async () => { - const list: Array = [] + const list: Array = [] for (const cat of Object.values(Category)) { if (typeof cat !== "number") continue list.push({ @@ -19,7 +18,7 @@ const btsp = async () => { }) } - const res: categoryList = { + const res: CategoryList = { count: list.length, list: list }