Files
LawinServer/structure/contentpages.js
PRO100KatYT 4b2ee884f4 LawinServer News Tab for CH2 & CH3
Furthermore:
- Fixed the playlist images not loading on some builds.
- Added the original solo, duo and squads images.
- Fixed not being able to press "Play" when StW was selected via the discovery menu on latest.
- Fixed the translations not diplaying for the Portugese (Brazil) language.
2022-07-21 15:00:15 +02:00

34 lines
1.0 KiB
JavaScript

const Express = require("express");
const express = Express.Router();
const functions = require("./functions.js");
express.get("/content/api/pages/*", async (req, res) => {
const contentpages = functions.getContentPages(req);
res.json(contentpages)
})
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];
})
} catch (err) {}
res.json(motdTarget)
})
module.exports = express;