14 lines
411 B
JavaScript
14 lines
411 B
JavaScript
import { getLots } from '../../helpers/lotOccupancyDB/getLots.js';
|
|
export const handler = async (request, response) => {
|
|
const result = getLots(request.body, {
|
|
limit: request.body.limit,
|
|
offset: request.body.offset
|
|
});
|
|
response.json({
|
|
count: result.count,
|
|
offset: Number.parseInt(request.body.offset, 10),
|
|
lots: result.lots
|
|
});
|
|
};
|
|
export default handler;
|