feat: playedParkourTutorial (#1579)
Reviewed-on: #1579 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
This commit is contained in:
parent
525e3067c9
commit
97d27e8110
9
src/controllers/api/playedParkourTutorialController.ts
Normal file
9
src/controllers/api/playedParkourTutorialController.ts
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import { Inventory } from "@/src/models/inventoryModels/inventoryModel";
|
||||||
|
import { getAccountIdForRequest } from "@/src/services/loginService";
|
||||||
|
import { RequestHandler } from "express";
|
||||||
|
|
||||||
|
export const playedParkourTutorialController: RequestHandler = async (req, res) => {
|
||||||
|
const accountId = await getAccountIdForRequest(req);
|
||||||
|
await Inventory.updateOne({ accountOwnerId: accountId }, { PlayedParkourTutorial: true });
|
||||||
|
res.end();
|
||||||
|
};
|
@ -85,6 +85,7 @@ import { modularWeaponSaleController } from "@/src/controllers/api/modularWeapon
|
|||||||
import { nameWeaponController } from "@/src/controllers/api/nameWeaponController";
|
import { nameWeaponController } from "@/src/controllers/api/nameWeaponController";
|
||||||
import { nemesisController } from "@/src/controllers/api/nemesisController";
|
import { nemesisController } from "@/src/controllers/api/nemesisController";
|
||||||
import { placeDecoInComponentController } from "@/src/controllers/api/placeDecoInComponentController";
|
import { placeDecoInComponentController } from "@/src/controllers/api/placeDecoInComponentController";
|
||||||
|
import { playedParkourTutorialController } from "@/src/controllers/api/playedParkourTutorialController";
|
||||||
import { playerSkillsController } from "@/src/controllers/api/playerSkillsController";
|
import { playerSkillsController } from "@/src/controllers/api/playerSkillsController";
|
||||||
import { postGuildAdvertisementController } from "@/src/controllers/api/postGuildAdvertisementController";
|
import { postGuildAdvertisementController } from "@/src/controllers/api/postGuildAdvertisementController";
|
||||||
import { projectionManagerController } from "@/src/controllers/api/projectionManagerController";
|
import { projectionManagerController } from "@/src/controllers/api/projectionManagerController";
|
||||||
@ -177,6 +178,7 @@ apiRouter.get("/logout.php", logoutController);
|
|||||||
apiRouter.get("/marketRecommendations.php", marketRecommendationsController);
|
apiRouter.get("/marketRecommendations.php", marketRecommendationsController);
|
||||||
apiRouter.get("/marketSearchRecommendations.php", marketRecommendationsController);
|
apiRouter.get("/marketSearchRecommendations.php", marketRecommendationsController);
|
||||||
apiRouter.get("/modularWeaponSale.php", modularWeaponSaleController);
|
apiRouter.get("/modularWeaponSale.php", modularWeaponSaleController);
|
||||||
|
apiRouter.get("/playedParkourTutorial.php", playedParkourTutorialController);
|
||||||
apiRouter.get("/queueDojoComponentDestruction.php", queueDojoComponentDestructionController);
|
apiRouter.get("/queueDojoComponentDestruction.php", queueDojoComponentDestructionController);
|
||||||
apiRouter.get("/removeFromAlliance.php", removeFromAllianceController);
|
apiRouter.get("/removeFromAlliance.php", removeFromAllianceController);
|
||||||
apiRouter.get("/setActiveQuest.php", setActiveQuestController);
|
apiRouter.get("/setActiveQuest.php", setActiveQuestController);
|
||||||
|
@ -178,7 +178,9 @@ export const addStartingGear = async (
|
|||||||
combineInventoryChanges(inventoryChanges, inventoryDelta);
|
combineInventoryChanges(inventoryChanges, inventoryDelta);
|
||||||
}
|
}
|
||||||
|
|
||||||
inventory.PlayedParkourTutorial = true;
|
if (inventory.ReceivedStartingGear) {
|
||||||
|
logger.warn(`account already had starting gear but asked for it again?!`);
|
||||||
|
}
|
||||||
inventory.ReceivedStartingGear = true;
|
inventory.ReceivedStartingGear = true;
|
||||||
|
|
||||||
return inventoryChanges;
|
return inventoryChanges;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user