返回提交历史
Added
src/controllers/api/playedParkourTutorialController.ts
+9
-0
Modified
src/routes/api.ts
+2
-0
Modified
src/services/inventoryService.ts
+3
-1
XFEstudio/SpaceNinjaServer
feat: playedParkourTutorial (#1579)
Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/1579 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
97d27e81
代码差异
3 个文件
+14
-1
@@ -0,0 +1,9 @@
1
import { Inventory } from "@/src/models/inventoryModels/inventoryModel";
2
import { getAccountIdForRequest } from "@/src/services/loginService";
3
import { RequestHandler } from "express";
4
5
export const playedParkourTutorialController: RequestHandler = async (req, res) => {
6
const accountId = await getAccountIdForRequest(req);
7
await Inventory.updateOne({ accountOwnerId: accountId }, { PlayedParkourTutorial: true });
8
res.end();
9
};
@@ -85,6 +85,7 @@ import { modularWeaponSaleController } from "@/src/controllers/api/modularWeapon
85
85
import { nameWeaponController } from "@/src/controllers/api/nameWeaponController";
86
86
import { nemesisController } from "@/src/controllers/api/nemesisController";
87
87
import { placeDecoInComponentController } from "@/src/controllers/api/placeDecoInComponentController";
88
import { playedParkourTutorialController } from "@/src/controllers/api/playedParkourTutorialController";
88
89
import { playerSkillsController } from "@/src/controllers/api/playerSkillsController";
89
90
import { postGuildAdvertisementController } from "@/src/controllers/api/postGuildAdvertisementController";
90
91
import { projectionManagerController } from "@/src/controllers/api/projectionManagerController";
@@ -177,6 +178,7 @@ apiRouter.get("/logout.php", logoutController);
177
178
apiRouter.get("/marketRecommendations.php", marketRecommendationsController);
178
179
apiRouter.get("/marketSearchRecommendations.php", marketRecommendationsController);
179
180
apiRouter.get("/modularWeaponSale.php", modularWeaponSaleController);
181
apiRouter.get("/playedParkourTutorial.php", playedParkourTutorialController);
180
182
apiRouter.get("/queueDojoComponentDestruction.php", queueDojoComponentDestructionController);
181
183
apiRouter.get("/removeFromAlliance.php", removeFromAllianceController);
182
184
apiRouter.get("/setActiveQuest.php", setActiveQuestController);
@@ -178,7 +178,9 @@ export const addStartingGear = async (
178
178
combineInventoryChanges(inventoryChanges, inventoryDelta);
179
179
}
180
180
181
inventory.PlayedParkourTutorial = true;
181
if (inventory.ReceivedStartingGear) {
182
logger.warn(`account already had starting gear but asked for it again?!`);
183
}
182
184
inventory.ReceivedStartingGear = true;
183
185
184
186
return inventoryChanges;