17 lines
428 B
TypeScript
17 lines
428 B
TypeScript
import type { RequestHandler } from "express";
|
|
|
|
import { getPastLotOccupancyOccupants } from "../../helpers/lotOccupancyDB/getPastLotOccupancyOccupants.js";
|
|
|
|
export const handler: RequestHandler = (request, response) => {
|
|
|
|
const occupants = getPastLotOccupancyOccupants(request.body, {
|
|
limit: Number.parseInt(request.body.limit, 10)
|
|
});
|
|
|
|
response.json({
|
|
occupants
|
|
});
|
|
};
|
|
|
|
export default handler;
|