mirror of
https://github.com/Lawin0129/LawinServer.git
synced 2026-01-13 02:42:22 +01:00
Discovery Tab fix
This commit is contained in:
@@ -1,24 +1,9 @@
|
||||
const Express = require("express");
|
||||
const express = Express.Router();
|
||||
const discovery = require("./../responses/discovery_frontend.json");
|
||||
const discovery = require("./../responses/discovery/discovery_frontend.json");
|
||||
|
||||
express.post("/fortnite/api/game/v2/creative/discovery/surface/*", async (req, res) => {
|
||||
switch (req.body.surfaceName) {
|
||||
case "CreativeDiscoverySurface_Frontend":
|
||||
if (req.body.panelName) {
|
||||
for (var i in discovery.Panels) {
|
||||
if (discovery.Panels[i].PanelName == req.body.panelName) {
|
||||
res.json(discovery.Panels[i].Pages[req.body.pageIndex || 0])
|
||||
}
|
||||
}
|
||||
} else {
|
||||
res.json(discovery);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
res.json({});
|
||||
}
|
||||
res.json(discovery);
|
||||
})
|
||||
|
||||
module.exports = express;
|
||||
Reference in New Issue
Block a user