26 lines
666 B
TypeScript
26 lines
666 B
TypeScript
import type { Request, Response } from 'express'
|
|
|
|
import getMaps from '../../database/getMaps.js'
|
|
import {
|
|
getLotTypes,
|
|
getOccupancyTypes
|
|
} from '../../helpers/functions.cache.js'
|
|
import { getConfigProperty } from '../../helpers/config.helpers.js'
|
|
|
|
export default async function handler(
|
|
request: Request,
|
|
response: Response
|
|
): Promise<void> {
|
|
const maps = await getMaps()
|
|
const lotTypes = await getLotTypes()
|
|
const occupancyTypes = await getOccupancyTypes()
|
|
|
|
response.render('lotOccupancy-search', {
|
|
headTitle: `${getConfigProperty('aliases.occupancy')} Search`,
|
|
maps,
|
|
lotTypes,
|
|
occupancyTypes,
|
|
mapId: request.query.mapId
|
|
})
|
|
}
|