handle nemesis mode=rs

This commit is contained in:
Sainan 2025-04-12 19:24:03 +02:00
parent f1d0a5591f
commit fd0eedb042

View File

@ -66,6 +66,12 @@ export const nemesisController: RequestHandler = async (req, res) => {
} }
} }
res.json({ GuessResult: guessResult }); res.json({ GuessResult: guessResult });
} else if ((req.query.mode as string) == "rs") {
// report spawn; POST but no application data in body
const inventory = await getInventory(accountId, "Nemesis");
inventory.Nemesis!.LastEnc = inventory.Nemesis!.MissionCount;
await inventory.save();
res.json({ LastEnc: inventory.Nemesis!.LastEnc });
} else if ((req.query.mode as string) == "s") { } else if ((req.query.mode as string) == "s") {
const inventory = await getInventory(accountId, "Nemesis"); const inventory = await getInventory(accountId, "Nemesis");
const body = getJSONfromString<INemesisStartRequest>(String(req.body)); const body = getJSONfromString<INemesisStartRequest>(String(req.body));