All checks were successful
Build / build (pull_request) Successful in 1m1s
The only functionally relevant change is that orbiter scenes are now saved via SkinFlavourItem (as of U39?). The rest is cleanup of the types because the ship customization stuff was duplicated all over the place.
24 lines
936 B
TypeScript
24 lines
936 B
TypeScript
import { getAccountIdForRequest } from "@/src/services/loginService";
|
|
import { IPictureFrameInfo, ISetPlacedDecoInfoRequest } from "@/src/types/personalRoomsTypes";
|
|
import { RequestHandler } from "express";
|
|
import { handleSetPlacedDecoInfo } from "@/src/services/shipCustomizationsService";
|
|
|
|
export const setPlacedDecoInfoController: RequestHandler = async (req, res) => {
|
|
const accountId = await getAccountIdForRequest(req);
|
|
const payload = JSON.parse(req.body as string) as ISetPlacedDecoInfoRequest;
|
|
await handleSetPlacedDecoInfo(accountId, payload);
|
|
res.json({
|
|
DecoId: payload.DecoId,
|
|
IsPicture: true,
|
|
PictureFrameInfo: payload.PictureFrameInfo,
|
|
BootLocation: payload.BootLocation
|
|
} satisfies ISetPlacedDecoInfoResponse);
|
|
};
|
|
|
|
interface ISetPlacedDecoInfoResponse {
|
|
DecoId: string;
|
|
IsPicture: boolean;
|
|
PictureFrameInfo?: IPictureFrameInfo;
|
|
BootLocation?: string;
|
|
}
|