15 lines
503 B
JavaScript
15 lines
503 B
JavaScript
import * as configFunctions from "../../helpers/functions.config.js";
|
|
import { getLot } from "../../helpers/lotOccupancyDB/getLot.js";
|
|
export const handler = (request, response) => {
|
|
const lot = getLot(request.params.lotId);
|
|
if (!lot) {
|
|
return response.redirect(configFunctions.getProperty("reverseProxy.urlPrefix") +
|
|
"/lots/?error=lotIdNotFound");
|
|
}
|
|
return response.render("lot-view", {
|
|
headTitle: lot.lotName,
|
|
lot
|
|
});
|
|
};
|
|
export default handler;
|