mirror of
https://github.com/Auties00/Reboot-Launcher.git
synced 2026-01-13 03:02:22 +01:00
22 lines
677 B
JavaScript
22 lines
677 B
JavaScript
const Express = require("express");
|
|
const express = Express.Router();
|
|
const fs = require("fs");
|
|
const privacy = require("./../responses/privacy.json");
|
|
|
|
express.get("/fortnite/api/game/v2/privacy/account/:accountId", async (req, res) => {
|
|
privacy.accountId = req.params.accountId;
|
|
|
|
res.json(privacy);
|
|
})
|
|
|
|
express.post("/fortnite/api/game/v2/privacy/account/:accountId", async (req, res) => {
|
|
privacy.accountId = req.params.accountId;
|
|
privacy.optOutOfPublicLeaderboards = req.body.optOutOfPublicLeaderboards;
|
|
|
|
fs.writeFileSync("./responses/privacy.json", JSON.stringify(privacy, null, 2));
|
|
|
|
res.json(privacy);
|
|
res.end();
|
|
})
|
|
|
|
module.exports = express; |