import { moveWorkOrderTypeUp, moveWorkOrderTypeUpToTop } from "../../helpers/lotOccupancyDB/moveWorkOrderTypeUp.js";
import { getWorkOrderTypes } from "../../helpers/functions.cache.js";
export const handler = async (request, response) => {
    const success = request.body.moveToTop === "1"
        ? moveWorkOrderTypeUpToTop(request.body.workOrderTypeId)
        : moveWorkOrderTypeUp(request.body.workOrderTypeId);
    const workOrderTypes = getWorkOrderTypes();
    response.json({
        success,
        workOrderTypes
    });
};
export default handler;
