feat: startLibraryPersonalTarget #873

Merged
Sainan merged 1 commits from startLibraryPersonalTarget into main 2025-01-31 08:03:00 -08:00
4 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,14 @@
import { getInventory } from "@/src/services/inventoryService";
import { getAccountIdForRequest } from "@/src/services/loginService";
import { RequestHandler } from "express";
export const startLibraryPersonalTargetController: RequestHandler = async (req, res) => {
const accountId = await getAccountIdForRequest(req);
const inventory = await getInventory(accountId);
inventory.LibraryPersonalTarget = req.query.target as string;
await inventory.save();
res.json({
IsQuest: false,
Target: req.query.target
});
};

View File

@ -1069,6 +1069,7 @@ const inventorySchema = new Schema<IInventoryDatabase, InventoryDocumentProps>(
//Night Wave Challenge
SeasonChallengeHistory: [seasonChallengeHistorySchema],
LibraryPersonalTarget: String,
//Cephalon Simaris Entries Example:"TargetType"+"Scans"(1-10)+"Completed": true|false
LibraryPersonalProgress: [Schema.Types.Mixed],
//Cephalon Simaris Daily Task

View File

@ -68,6 +68,7 @@ import { setSupportedSyndicateController } from "@/src/controllers/api/setSuppor
import { setWeaponSkillTreeController } from "../controllers/api/setWeaponSkillTreeController";
import { shipDecorationsController } from "@/src/controllers/api/shipDecorationsController";
import { startDojoRecipeController } from "@/src/controllers/api/startDojoRecipeController";
import { startLibraryPersonalTargetController } from "@/src/controllers/api/startLibraryPersonalTargetController";
import { startRecipeController } from "@/src/controllers/api/startRecipeController";
import { stepSequencersController } from "@/src/controllers/api/stepSequencersController";
import { surveysController } from "@/src/controllers/api/surveysController";
@ -113,6 +114,7 @@ apiRouter.get("/setActiveQuest.php", setActiveQuestController);
apiRouter.get("/setActiveShip.php", setActiveShipController);
apiRouter.get("/setBootLocation.php", setBootLocationController);
apiRouter.get("/setSupportedSyndicate.php", setSupportedSyndicateController);
apiRouter.get("/startLibraryPersonalTarget.php", startLibraryPersonalTargetController);
apiRouter.get("/surveys.php", surveysController);
apiRouter.get("/updateSession.php", updateSessionGetController);

View File

@ -344,6 +344,7 @@ export interface IInventoryClient extends IDailyAffiliations {
Quests: any[];
Robotics: any[];
UsedDailyDeals: any[];
LibraryPersonalTarget: string;
LibraryPersonalProgress: ILibraryPersonalProgress[];
CollectibleSeries: ICollectibleSery[];
LibraryAvailableDailyTaskInfo: ILibraryAvailableDailyTaskInfo;