15 lines
354 B
TypeScript
15 lines
354 B
TypeScript
import type { RequestHandler } from 'express'
|
|
|
|
import { addLotOccupancy } from '../../helpers/lotOccupancyDB/addLotOccupancy.js'
|
|
|
|
export const handler: RequestHandler = (request, response) => {
|
|
const lotOccupancyId = addLotOccupancy(request.body, request.session)
|
|
|
|
response.json({
|
|
success: true,
|
|
lotOccupancyId
|
|
})
|
|
}
|
|
|
|
export default handler
|