From 8d406523a6efab633b97377656f51f45ab35e16b Mon Sep 17 00:00:00 2001 From: Mori Date: Mon, 23 Jun 2025 10:41:10 +0200 Subject: [PATCH] Added endpoint for retrieving full consolidated files, including the category --- backend/index.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/backend/index.ts b/backend/index.ts index 40076489..1b190331 100644 --- a/backend/index.ts +++ b/backend/index.ts @@ -48,6 +48,21 @@ app.get("/languages", (_req, res) => { return; }); +// Get all content (consolidated file) for language +app.get("/languages/:language", (req, res) => { + const { language } = req.params; + + const file = path.join(dataDir, `consolidated/${language}.json`); + const json = readJSON(file); + if (!json) { + res.status(404).json({ error: "Language file not found" }); + return; + } + + res.json(json); + return; +}); + // Get all categories for a given language app.get("/categories/:language", (req, res) => { const { language } = req.params; pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy