diff --git a/structure/contentpages.js b/structure/contentpages.js index ffb6a85..449a60a 100644 --- a/structure/contentpages.js +++ b/structure/contentpages.js @@ -11,20 +11,10 @@ express.get("/content/api/pages/*", async (req, res) => { express.post("/api/v1/fortnite-br/surfaces/motd/target", async (req, res) => { const motdTarget = JSON.parse(JSON.stringify(require("./../responses/motdTarget.json"))); - var Language = "en"; - - if (req.body.language) { - if (req.body.language.includes("-") && req.body.language != "es-419" && req.body.language != "pt-BR") { - Language = req.body.language.split("-")[0]; - } else { - Language = req.body.language; - } - } - try { motdTarget.contentItems.forEach(item => { - item.contentFields.title = item.contentFields.title[Language]; - item.contentFields.body = item.contentFields.body[Language]; + item.contentFields.title = item.contentFields.title[req.body.language]; + item.contentFields.body = item.contentFields.body[req.body.language]; }) } catch (err) {}