From 326e19d86dfbeb0149a54fc3e8d7f87d85fbbc16 Mon Sep 17 00:00:00 2001 From: PRO100KatYT <67335438+PRO100KatYT@users.noreply.github.com> Date: Sat, 10 Aug 2024 08:09:29 +0200 Subject: [PATCH] Add lock-status response for discovery --- structure/discovery.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/structure/discovery.js b/structure/discovery.js index 305d0e3..3a6e5b0 100644 --- a/structure/discovery.js +++ b/structure/discovery.js @@ -54,4 +54,25 @@ express.get("/links/api/fn/mnemonic/*", async (req, res) => { } }) +express.post("/api/v1/links/lock-status/:accountId/check", async (req, res) => { + var response = { + "results": [], + "hasMore": false + }; + + if (req.body.linkCodes) { + for (var linkCode in req.body.linkCodes) { + response.results.push({ + "playerId": req.params.accountId, + "linkCode": req.body.linkCodes[linkCode], + "lockStatus": "UNLOCKED", + "lockStatusReason": "NONE", + "isVisible": true + }) + } + } + + res.json(response); +}) + module.exports = express; \ No newline at end of file