SpaceNinjaServer/src/controllers/custom/unlockAllIntrinsicsController.ts
Sainan d7a93463c0
All checks were successful
Build Docker image / docker-arm64 (push) Successful in 1m6s
Build / build (push) Successful in 1m8s
Build Docker image / docker-amd64 (push) Successful in 1m0s
chore: enforce consistent-type-imports (#2693)
Reviewed-on: #2693
Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com>
Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
2025-08-24 21:41:20 -07:00

20 lines
876 B
TypeScript

import { getInventory } from "@/src/services/inventoryService";
import { getAccountIdForRequest } from "@/src/services/loginService";
import type { RequestHandler } from "express";
export const unlockAllIntrinsicsController: RequestHandler = async (req, res) => {
const accountId = await getAccountIdForRequest(req);
const inventory = await getInventory(accountId, "PlayerSkills");
inventory.PlayerSkills.LPS_PILOTING = 10;
inventory.PlayerSkills.LPS_GUNNERY = 10;
inventory.PlayerSkills.LPS_TACTICAL = 10;
inventory.PlayerSkills.LPS_ENGINEERING = 10;
inventory.PlayerSkills.LPS_COMMAND = 10;
inventory.PlayerSkills.LPS_DRIFT_COMBAT = 10;
inventory.PlayerSkills.LPS_DRIFT_RIDING = 10;
inventory.PlayerSkills.LPS_DRIFT_OPPORTUNITY = 10;
inventory.PlayerSkills.LPS_DRIFT_ENDURANCE = 10;
await inventory.save();
res.end();
};