SpaceNinjaServer/src/controllers/api/unlockShipFeatureController.ts
Sainan 1d1abf5550
All checks were successful
Build / build (22) (push) Successful in 39s
Build / build (20) (push) Successful in 1m16s
Build / build (18) (push) Successful in 1m1s
Build Docker image / docker (push) Successful in 33s
chore: remove unused eslint-disable directives
2025-04-05 02:54:06 +02:00

12 lines
570 B
TypeScript

import { RequestHandler } from "express";
import { updateShipFeature } from "@/src/services/personalRoomsService";
import { IUnlockShipFeatureRequest } from "@/src/types/requestTypes";
import { parseString } from "@/src/helpers/general";
export const unlockShipFeatureController: RequestHandler = async (req, res) => {
const accountId = parseString(req.query.accountId);
const shipFeatureRequest = JSON.parse((req.body as string).toString()) as IUnlockShipFeatureRequest;
await updateShipFeature(accountId, shipFeatureRequest.Feature);
res.send([]);
};