Party fix

This commit is contained in:
Lawin0129
2022-03-14 19:59:24 +00:00
parent 1fc2de2593
commit c54f807af1
5 changed files with 69 additions and 52 deletions

View File

@@ -24,6 +24,7 @@ express.use(Express.json());
express.use(Express.urlencoded({ extended: true })); express.use(Express.urlencoded({ extended: true }));
express.use(Express.static('public')); express.use(Express.static('public'));
express.use(require("./structure/party.js"));
express.use(require("./structure/discovery.js")) express.use(require("./structure/discovery.js"))
express.use(require("./structure/privacy.js")); express.use(require("./structure/privacy.js"));
express.use(require("./structure/timeline.js")); express.use(require("./structure/timeline.js"));

View File

@@ -36,17 +36,6 @@
}, },
"quantity": 10000000 "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": { "HomebaseBannerColor:DefaultColor1": {
"templateId": "HomebaseBannerColor:DefaultColor1", "templateId": "HomebaseBannerColor:DefaultColor1",
"attributes": { "attributes": {

View File

@@ -29205,17 +29205,6 @@
}, },
"quantity": 1 "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": { "Worker:Worker_Halloween_Troll_VR_T05": {
"templateId": "Worker:Worker_Halloween_Troll_VR_T05", "templateId": "Worker:Worker_Halloween_Troll_VR_T05",
"attributes": { "attributes": {

View File

@@ -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) => { express.get("/fortnite/api/game/v2/events/tournamentandhistory/*/EU/WindowsClient", async (req, res) => {
res.json({}); 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) => { 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) => { express.get("/region", async (req, res) => {

60
structure/party.js Normal file
View File

@@ -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;