sunrise-cms/handlers/admin-post/doMoveLotOccupantTypeUp.ts

19 lines
514 B
TypeScript

import type { RequestHandler } from "express";
import { moveLotOccupantTypeUp } from "../../helpers/lotOccupancyDB/moveLotOccupantTypeUp.js";
import { getLotOccupantTypes } from "../../helpers/functions.cache.js";
export const handler: RequestHandler = async (request, response) => {
const success = moveLotOccupantTypeUp(request.body.lotOccupantTypeId);
const lotOccupantTypes = getLotOccupantTypes();
response.json({
success,
lotOccupantTypes
});
};
export default handler;