25 lines
621 B
TypeScript
25 lines
621 B
TypeScript
import type {
|
|
RequestHandler
|
|
} from "express";
|
|
|
|
import {
|
|
deleteLotOccupancyComment
|
|
} from "../../helpers/lotOccupancyDB/deleteLotOccupancyComment.js";
|
|
|
|
import {getLotOccupancyComments} from "../../helpers/lotOccupancyDB/getLotOccupancyComments.js";
|
|
|
|
|
|
export const handler: RequestHandler = async (request, response) => {
|
|
|
|
const success = deleteLotOccupancyComment(request.body.lotOccupancyCommentId, request.session);
|
|
|
|
const lotOccupancyComments = getLotOccupancyComments(request.body.lotOccupancyId);
|
|
|
|
response.json({
|
|
success,
|
|
lotOccupancyComments
|
|
});
|
|
};
|
|
|
|
|
|
export default handler; |