19 lines
427 B
TypeScript
19 lines
427 B
TypeScript
import type { Request, Response } from 'express'
|
|
|
|
import { getPastLotOccupancyOccupants } from '../../database/getPastLotOccupancyOccupants.js'
|
|
|
|
export async function handler(
|
|
request: Request,
|
|
response: Response
|
|
): Promise<void> {
|
|
const occupants = await getPastLotOccupancyOccupants(request.body, {
|
|
limit: Number.parseInt(request.body.limit, 10)
|
|
})
|
|
|
|
response.json({
|
|
occupants
|
|
})
|
|
}
|
|
|
|
export default handler
|