From 7fa9d08a4d9d4785213143d03a5a48af31a10630 Mon Sep 17 00:00:00 2001 From: Sainan Date: Mon, 13 May 2024 14:40:54 +0200 Subject: [PATCH] feat: restock darvo (#221) --- src/controllers/api/getDailyDealStockLevelsController.ts | 8 ++++++++ src/routes/api.ts | 2 ++ static/fixed_responses/worldState.json | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 src/controllers/api/getDailyDealStockLevelsController.ts diff --git a/src/controllers/api/getDailyDealStockLevelsController.ts b/src/controllers/api/getDailyDealStockLevelsController.ts new file mode 100644 index 00000000..efbb0cec --- /dev/null +++ b/src/controllers/api/getDailyDealStockLevelsController.ts @@ -0,0 +1,8 @@ +import { RequestHandler } from "express"; + +export const getDailyDealStockLevelsController: RequestHandler = (req, res) => { + res.json({ + StoreItem: req.query.productName, + AmountSold: 0 + }); +}; diff --git a/src/routes/api.ts b/src/routes/api.ts index 8212ebc1..5770ee11 100644 --- a/src/routes/api.ts +++ b/src/routes/api.ts @@ -47,6 +47,7 @@ import { createGuildController } from "@/src/controllers/api/createGuildControll import { sellController } from "@/src/controllers/api/sellController"; import { upgradesController } from "@/src/controllers/api/upgradesController"; import { setSupportedSyndicateController } from "@/src/controllers/api/setSupportedSyndicateController"; +import { getDailyDealStockLevelsController } from "@/src/controllers/api/getDailyDealStockLevelsController"; const apiRouter = express.Router(); @@ -75,6 +76,7 @@ apiRouter.get("/setBootLocation.php", setBootLocationController); apiRouter.get("/setActiveShip.php", setActiveShipController); apiRouter.get("/getGuild.php", getGuildController); apiRouter.get("/setSupportedSyndicate.php", setSupportedSyndicateController); +apiRouter.get("/getDailyDealStockLevels.php", getDailyDealStockLevelsController); // post // eslint-disable-next-line @typescript-eslint/no-misused-promises diff --git a/static/fixed_responses/worldState.json b/static/fixed_responses/worldState.json index da1856fa..9d40ea2b 100644 --- a/static/fixed_responses/worldState.json +++ b/static/fixed_responses/worldState.json @@ -942,7 +942,7 @@ "OriginalPrice": 40, "SalePrice": 20, "AmountTotal": 50, - "AmountSold": 50 + "AmountSold": 0 } ], "LibraryInfo": { "LastCompletedTargetType": "/Lotus/Types/Game/Library/Targets/Research7Target" },