Regrouped some of the responses

This commit is contained in:
PRO100KatYT
2023-03-12 14:52:39 +01:00
parent 628ddb6133
commit 4d2f8e4b7c
23 changed files with 18 additions and 18 deletions

View File

@@ -9,7 +9,7 @@ express.get("/content/api/pages/*", async (req, res) => {
}) })
express.post("/api/v1/fortnite-br/surfaces/motd/target", 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"))); const motdTarget = JSON.parse(JSON.stringify(require("./../responses/Athena/motdTarget.json")));
try { try {
motdTarget.contentItems.forEach(item => { motdTarget.contentItems.forEach(item => {

View File

@@ -1,6 +1,6 @@
const Express = require("express"); const Express = require("express");
const express = Express.Router(); const express = Express.Router();
const discovery = require("./../responses/discovery/discovery_frontend.json"); const discovery = require("./../responses/Athena/Discovery/discovery_frontend.json");
express.post("*/discovery/surface/*", async (req, res) => { express.post("*/discovery/surface/*", async (req, res) => {
res.json(discovery); res.json(discovery);

View File

@@ -145,7 +145,7 @@ function getItemShop() {
function getTheater(req) { function getTheater(req) {
const memory = GetVersionInfo(req); const memory = GetVersionInfo(req);
var theater = JSON.stringify(require("./../responses/worldstw.json")); var theater = JSON.stringify(require("./../responses/Campaign/worldstw.json"));
var Season = "Season" + memory.season; var Season = "Season" + memory.season;
try { try {

View File

@@ -309,7 +309,7 @@ express.post("/datarouter/api/v1/public/data", async (req, res) => {
express.post("/api/v1/assets/Fortnite/*/*", async (req, res) => { express.post("/api/v1/assets/Fortnite/*/*", async (req, res) => {
if (req.body.hasOwnProperty("FortCreativeDiscoverySurface") && req.body.FortCreativeDiscoverySurface == 0) { if (req.body.hasOwnProperty("FortCreativeDiscoverySurface") && req.body.FortCreativeDiscoverySurface == 0) {
const discovery_api_assets = require("./../responses/discovery/discovery_api_assets.json"); const discovery_api_assets = require("./../responses/Athena/Discovery/discovery_api_assets.json");
res.json(discovery_api_assets) res.json(discovery_api_assets)
} }
else { else {

View File

@@ -26,7 +26,7 @@ express.use((req, res, next) => {
if (!profile.commandRevision) profile.commandRevision = 0; if (!profile.commandRevision) profile.commandRevision = 0;
if (file == "athena.json") { if (file == "athena.json") {
var SeasonData = JSON.parse(JSON.stringify(require("./../responses/SeasonData.json"))); var SeasonData = JSON.parse(JSON.stringify(require("./../responses/Athena/SeasonData.json")));
profile.stats.attributes.season_num = memory.season; profile.stats.attributes.season_num = memory.season;
if (SeasonData[`Season${memory.season}`]) { if (SeasonData[`Season${memory.season}`]) {
@@ -312,7 +312,7 @@ express.post("/fortnite/api/game/v2/profile/*/client/PurchaseHomebaseNode", asyn
express.post("/fortnite/api/game/v2/profile/*/client/UnlockRewardNode", async (req, res) => { express.post("/fortnite/api/game/v2/profile/*/client/UnlockRewardNode", async (req, res) => {
const profile = require(`./../profiles/${req.query.profileId || "athena"}.json`); const profile = require(`./../profiles/${req.query.profileId || "athena"}.json`);
const common_core = require("./../profiles/common_core.json"); const common_core = require("./../profiles/common_core.json");
const WinterFestIDS = require("./../responses/winterfestrewards.json"); const WinterFestIDS = require("./../responses/Athena/winterfestrewards.json");
const memory = functions.GetVersionInfo(req); const memory = functions.GetVersionInfo(req);
// do not change any of these or you will end up breaking it // do not change any of these or you will end up breaking it
@@ -1408,7 +1408,7 @@ express.post("/fortnite/api/game/v2/profile/*/client/IncrementNamedCounterStat",
// Claim STW daily reward // Claim STW daily reward
express.post("/fortnite/api/game/v2/profile/*/client/ClaimLoginReward", async (req, res) => { express.post("/fortnite/api/game/v2/profile/*/client/ClaimLoginReward", async (req, res) => {
const profile = require(`./../profiles/${req.query.profileId || "campaign"}.json`); const profile = require(`./../profiles/${req.query.profileId || "campaign"}.json`);
const DailyRewards = require("./../responses/dailyrewards.json"); const DailyRewards = require("./../responses/Campaign/dailyrewards.json");
const memory = functions.GetVersionInfo(req); const memory = functions.GetVersionInfo(req);
// do not change any of these or you will end up breaking it // do not change any of these or you will end up breaking it
@@ -2396,7 +2396,7 @@ express.post("/fortnite/api/game/v2/profile/*/client/PromoteItem", async (req, r
// Transform items STW // Transform items STW
express.post("/fortnite/api/game/v2/profile/*/client/TransmogItem", async (req, res) => { express.post("/fortnite/api/game/v2/profile/*/client/TransmogItem", async (req, res) => {
const profile = require(`./../profiles/${req.query.profileId || "campaign"}.json`); const profile = require(`./../profiles/${req.query.profileId || "campaign"}.json`);
var transformItemIDS = require("./../responses/transformItemIDS.json"); var transformItemIDS = require("./../responses/Campaign/transformItemIDS.json");
// do not change any of these or you will end up breaking it // do not change any of these or you will end up breaking it
var ApplyProfileChanges = []; var ApplyProfileChanges = [];
@@ -2421,7 +2421,7 @@ express.post("/fortnite/api/game/v2/profile/*/client/TransmogItem", async (req,
transformItemIDS = transformItemIDS[req.body.transmogKeyTemplateId] transformItemIDS = transformItemIDS[req.body.transmogKeyTemplateId]
} }
else { else {
transformItemIDS = require("./../responses/ItemIDS.json"); transformItemIDS = require("./../responses/Campaign/cardpackLootItemIDS.json");
} }
StatChanged = true; StatChanged = true;
@@ -4539,7 +4539,7 @@ express.post("/fortnite/api/game/v2/profile/*/client/UnassignAllSquads", async (
// Open llama STW // Open llama STW
express.post("/fortnite/api/game/v2/profile/*/client/OpenCardPack", async (req, res) => { express.post("/fortnite/api/game/v2/profile/*/client/OpenCardPack", async (req, res) => {
const profile = require(`./../profiles/${req.query.profileId || "campaign"}.json`); const profile = require(`./../profiles/${req.query.profileId || "campaign"}.json`);
const ItemIDS = require("./../responses/ItemIDS.json"); const ItemIDS = require("./../responses/Campaign/cardpackLootItemIDS.json");
// do not change any of these or you will end up breaking it // do not change any of these or you will end up breaking it
var ApplyProfileChanges = []; var ApplyProfileChanges = [];
@@ -4634,7 +4634,7 @@ express.post("/fortnite/api/game/v2/profile/*/client/OpenCardPack", async (req,
// Add items to StW X-Ray Llamas // Add items to StW X-Ray Llamas
express.post("/fortnite/api/game/v2/profile/*/client/PopulatePrerolledOffers", async (req, res) => { express.post("/fortnite/api/game/v2/profile/*/client/PopulatePrerolledOffers", async (req, res) => {
const profile = require(`./../profiles/${req.query.profileId || "campaign"}.json`); const profile = require(`./../profiles/${req.query.profileId || "campaign"}.json`);
const ItemIDS = require("./../responses/ItemIDS.json"); const ItemIDS = require("./../responses/Campaign/cardpackLootItemIDS.json");
// do not change any of these or you will end up breaking it // do not change any of these or you will end up breaking it
var ApplyProfileChanges = []; var ApplyProfileChanges = [];
@@ -4708,7 +4708,7 @@ express.post("/fortnite/api/game/v2/profile/*/client/PurchaseCatalogEntry", asyn
const profile = require(`./../profiles/${req.query.profileId || "profile0"}.json`); const profile = require(`./../profiles/${req.query.profileId || "profile0"}.json`);
const campaign = require("./../profiles/campaign.json"); const campaign = require("./../profiles/campaign.json");
const athena = require("./../profiles/athena.json"); const athena = require("./../profiles/athena.json");
const ItemIDS = require("./../responses/ItemIDS.json"); const ItemIDS = require("./../responses/Campaign/cardpackLootItemIDS.json");
// do not change any of these or you will end up breaking it // do not change any of these or you will end up breaking it
var ApplyProfileChanges = []; var ApplyProfileChanges = [];
@@ -4798,10 +4798,10 @@ express.post("/fortnite/api/game/v2/profile/*/client/PurchaseCatalogEntry", asyn
} }
var Season = value.name.split("BR")[1]; var Season = value.name.split("BR")[1];
var BattlePass = require(`./../responses/BattlePass/${Season}.json`); var BattlePass = require(`./../responses/Athena/BattlePass/${Season}.json`);
if (BattlePass) { if (BattlePass) {
var SeasonData = require("./../responses/SeasonData.json"); var SeasonData = require("./../responses/Athena/SeasonData.json");
if (BattlePass.battlePassOfferId == offer.offerId || BattlePass.battleBundleOfferId == offer.offerId) { if (BattlePass.battlePassOfferId == offer.offerId || BattlePass.battleBundleOfferId == offer.offerId) {
var lootList = []; var lootList = [];
@@ -5285,7 +5285,7 @@ express.post("/fortnite/api/game/v2/profile/*/client/PurchaseCatalogEntry", asyn
AthenaModified = true; AthenaModified = true;
} }
fs.writeFileSync("./responses/SeasonData.json", JSON.stringify(SeasonData, null, 2)); fs.writeFileSync("./responses/Athena/SeasonData.json", JSON.stringify(SeasonData, null, 2));
} }
} }
} }
@@ -5667,10 +5667,10 @@ express.post("/fortnite/api/game/v2/profile/*/client/PurchaseCatalogEntry", asyn
} }
var Season = value.name.split("BR")[1]; var Season = value.name.split("BR")[1];
var BattlePass = require(`./../responses/BattlePass/${Season}.json`); var BattlePass = require(`./../responses/Athena/BattlePass/${Season}.json`);
if (BattlePass) { if (BattlePass) {
var SeasonData = require("./../responses/SeasonData.json"); var SeasonData = require("./../responses/Athena/SeasonData.json");
if (BattlePass.battlePassOfferId == offer.offerId || BattlePass.battleBundleOfferId == offer.offerId) { if (BattlePass.battlePassOfferId == offer.offerId || BattlePass.battleBundleOfferId == offer.offerId) {
var lootList = []; var lootList = [];
@@ -6154,7 +6154,7 @@ express.post("/fortnite/api/game/v2/profile/*/client/PurchaseCatalogEntry", asyn
AthenaModified = true; AthenaModified = true;
} }
fs.writeFileSync("./responses/SeasonData.json", JSON.stringify(SeasonData, null, 2)); fs.writeFileSync("./responses/Athena/SeasonData.json", JSON.stringify(SeasonData, null, 2));
} }
} }
} }