diff --git a/index.js b/index.js index ed8f74e..94fe04a 100644 --- a/index.js +++ b/index.js @@ -24,6 +24,7 @@ express.use(Express.json()); express.use(Express.urlencoded({ extended: true })); express.use(Express.static('public')); +express.use(require("./structure/party.js")); express.use(require("./structure/discovery.js")) express.use(require("./structure/privacy.js")); express.use(require("./structure/timeline.js")); diff --git a/profiles/common_core.json b/profiles/common_core.json index 5807011..ff6e5cf 100644 --- a/profiles/common_core.json +++ b/profiles/common_core.json @@ -36,17 +36,6 @@ }, "quantity": 10000000 }, - "Token:FounderChatUnlock": { - "templateId": "Token:FounderChatUnlock", - "attributes": { - "max_level_bonus": 0, - "level": 1, - "item_seen": true, - "xp": 0, - "favorite": false - }, - "quantity": 1 - }, "HomebaseBannerColor:DefaultColor1": { "templateId": "HomebaseBannerColor:DefaultColor1", "attributes": { diff --git a/profiles/profile0.json b/profiles/profile0.json index 8f88496..8ebfd1f 100644 --- a/profiles/profile0.json +++ b/profiles/profile0.json @@ -29205,17 +29205,6 @@ }, "quantity": 1 }, - "Token:FounderChatUnlock": { - "templateId": "Token:FounderChatUnlock", - "attributes": { - "max_level_bonus": 0, - "level": 1, - "item_seen": true, - "xp": 0, - "favorite": false - }, - "quantity": 1 - }, "Worker:Worker_Halloween_Troll_VR_T05": { "templateId": "Worker:Worker_Halloween_Troll_VR_T05", "attributes": { diff --git a/structure/main.js b/structure/main.js index 9a0a3ca..8ef1adb 100644 --- a/structure/main.js +++ b/structure/main.js @@ -81,35 +81,6 @@ express.get("/socialban/api/public/v1/*", async (req, res) => { }); }) -express.get("/party/api/v1/Fortnite/user/*", async (req, res) => { - res.json({ - "current": [], - "pending": [], - "invites": [], - "pings": [] - }); -}) - -express.post("/party/api/v1/Fortnite/user/*/current/*", async (req, res) => { - res.json({}); -}) - -express.post("/party/api/v1/Fortnite/user/*/pending/*", async (req, res) => { - res.json({}); -}) - -express.post("/party/api/v1/Fortnite/user/*/invites/*", async (req, res) => { - res.json({}); -}) - -express.get("/fortnite/api/game/v2/events/tournamentandhistory/*/EU/WindowsClient", async (req, res) => { - res.json({}); -}) - -express.post("/party/api/v1/Fortnite/user/*/pings/*", async (req, res) => { - res.json({}); -}) - express.get("/fortnite/api/game/v2/events/tournamentandhistory/*/EU/WindowsClient", async (req, res) => { res.json({}); }) @@ -200,7 +171,14 @@ express.post("/datarouter/api/v1/public/data", async (req, res) => { }) express.post("/api/v1/assets/Fortnite/*/*", async (req, res) => { - res.json({"FortCreativeDiscoverySurface":{"meta":{"promotion":1},"assets":{}}}) + res.json({ + "FortCreativeDiscoverySurface": { + "meta": { + "promotion": 0 + }, + "assets": {} + } + }) }) express.get("/region", async (req, res) => { diff --git a/structure/party.js b/structure/party.js new file mode 100644 index 0000000..7fe827c --- /dev/null +++ b/structure/party.js @@ -0,0 +1,60 @@ +const Express = require("express"); +const express = Express.Router(); +const functions = require("./functions.js"); + +express.get("/party/api/v1/Fortnite/user/*", async (req, res) => { + res.json({ + "current": [], + "pending": [], + "invites": [], + "pings": [] + }); +}) + +express.post("/party/api/v1/Fortnite/parties", async (req, res) => { + if (!req.body.join_info) return res.json({}); + if (!req.body.join_info.connection) return res.json({}); + + res.json({ + "id": functions.MakeID().replace(/-/ig, ""), + "created_at": new Date().toISOString(), + "updated_at": new Date().toISOString(), + "config": { + "type": "DEFAULT", + ...req.body.config, + "discoverability": "ALL", + "sub_type": "default", + "invite_ttl": 14400, + "intention_ttl": 60 + }, + "members": [{ + "account_id": (req.body.join_info.connection.id || "").split("@prod")[0], + "meta": req.body.join_info.meta || {}, + "connections": [ + { + "id": req.body.join_info.connection.id || "", + "connected_at": new Date().toISOString(), + "updated_at": new Date().toISOString(), + "yield_leadership": false, + "meta": req.body.join_info.connection.meta || {} + } + ], + "revision": 0, + "updated_at": new Date().toISOString(), + "joined_at": new Date().toISOString(), + "role": "CAPTAIN" + }], + "applicants": [], + "meta": req.body.meta || {}, + "invites": [], + "revision": 0, + "intentions": [] + }) +}) + +express.all("/party/api/v1/Fortnite/parties/*", async (req, res) => { + res.status(204) + res.end() +}) + +module.exports = express; \ No newline at end of file