mirror of
https://github.com/Lawin0129/LawinServer.git
synced 2026-01-13 02:42:22 +01:00
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.
34 lines
1.0 KiB
JavaScript
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; |