Fix the Item Shop for v30.10+

This commit is contained in:
PRO100KatYT
2024-06-13 17:50:30 +02:00
parent 4c1e517b70
commit 70d46ffce3

View File

@@ -1,7 +1,6 @@
const Express = require("express"); const Express = require("express");
const express = Express.Router(); const express = Express.Router();
const functions = require("./functions.js"); const functions = require("./functions.js");
const catalog = functions.getItemShop();
const keychain = require("./../responses/keychain.json"); const keychain = require("./../responses/keychain.json");
express.get("/fortnite/api/storefront/v2/catalog", async (req, res) => { express.get("/fortnite/api/storefront/v2/catalog", async (req, res) => {
@@ -9,6 +8,13 @@ express.get("/fortnite/api/storefront/v2/catalog", async (req, res) => {
return res.status(404).end(); return res.status(404).end();
} }
var catalog = functions.getItemShop();
const memory = functions.GetVersionInfo(req);
if (memory.build >= 30.10) {
catalog = JSON.parse(JSON.stringify(catalog).replace(/"Normal"/g, '"Size_1_x_2"'));
}
res.json(catalog); res.json(catalog);
}) })