返回提交历史
Modified
src/controllers/api/missionInventoryUpdateController.ts
+2
-0
XFEstudio/SpaceNinjaServer
chore: log missionInventoryUpdate request body (#961)
there's still so much uncertainty about this, this is vital information to have logged by default, imo Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/961 Co-authored-by: Sainan <sainan@calamity.inc> Co-committed-by: Sainan <sainan@calamity.inc>
a62e8eeb
代码差异
1 个文件
+2
-0
@@ -5,6 +5,7 @@ import { IMissionInventoryUpdateRequest } from "@/src/types/requestTypes";
5
5
import { addMissionInventoryUpdates, addMissionRewards } from "@/src/services/missionInventoryUpdateService";
6
6
import { getInventory } from "@/src/services/inventoryService";
7
7
import { getInventoryResponse } from "./inventoryController";
8
import { logger } from "@/src/utils/logger";
8
9
9
10
/*
10
11
**** INPUT ****
@@ -50,6 +51,7 @@ import { getInventoryResponse } from "./inventoryController";
50
51
export const missionInventoryUpdateController: RequestHandler = async (req, res): Promise<void> => {
51
52
const accountId = await getAccountIdForRequest(req);
52
53
const missionReport = getJSONfromString<IMissionInventoryUpdateRequest>((req.body as string).toString());
54
logger.debug("mission report:", missionReport);
53
55
54
56
const inventory = await getInventory(accountId);
55
57
const inventoryUpdates = addMissionInventoryUpdates(inventory, missionReport);