feat: startLibraryPersonalTarget
This commit is contained in:
parent
cf196430b7
commit
87beed7229
14
src/controllers/api/startLibraryPersonalTargetController.ts
Normal file
14
src/controllers/api/startLibraryPersonalTargetController.ts
Normal 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
|
||||
});
|
||||
};
|
@ -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
|
||||
|
@ -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);
|
||||
|
||||
|
@ -344,6 +344,7 @@ export interface IInventoryClient extends IDailyAffiliations {
|
||||
Quests: any[];
|
||||
Robotics: any[];
|
||||
UsedDailyDeals: any[];
|
||||
LibraryPersonalTarget: string;
|
||||
LibraryPersonalProgress: ILibraryPersonalProgress[];
|
||||
CollectibleSeries: ICollectibleSery[];
|
||||
LibraryAvailableDailyTaskInfo: ILibraryAvailableDailyTaskInfo;
|
||||
|
Loading…
x
Reference in New Issue
Block a user