diff --git a/handlers/maps-post/doCreateMap.ts b/handlers/maps-post/doCreateMap.ts index 7388bde5..538f6031 100644 --- a/handlers/maps-post/doCreateMap.ts +++ b/handlers/maps-post/doCreateMap.ts @@ -1,16 +1,20 @@ -import type { RequestHandler } from "express"; +import type { + RequestHandler +} from "express"; -import { addMap } from "../../helpers/lotOccupancyDB/addMap.js"; +import { + addMap +} from "../../helpers/lotOccupancyDB/addMap.js"; export const handler: RequestHandler = async (request, response) => { - const mapId = addMap(request.body, request.session); + const mapId = addMap(request.body, request.session); - response.json({ - success: true, - mapId - }); + response.json({ + success: true, + mapId + }); }; diff --git a/handlers/maps-post/doUpdateMap.ts b/handlers/maps-post/doUpdateMap.ts index 86e0f14d..9108961d 100644 --- a/handlers/maps-post/doUpdateMap.ts +++ b/handlers/maps-post/doUpdateMap.ts @@ -1,16 +1,20 @@ -import type { RequestHandler } from "express"; +import type { + RequestHandler +} from "express"; -import { updateMap } from "../../helpers/lotOccupancyDB/updateMap.js"; +import { + updateMap +} from "../../helpers/lotOccupancyDB/updateMap.js"; export const handler: RequestHandler = async (request, response) => { - const success = updateMap(request.body, request.session); + const success = updateMap(request.body, request.session); - response.json({ - success, - mapId: request.body.mapId - }); + response.json({ + success, + mapId: request.body.mapId + }); }; diff --git a/views/lot-edit.ejs b/views/lot-edit.ejs index 793e50cb..a5ec5d7c 100644 --- a/views/lot-edit.ejs +++ b/views/lot-edit.ejs @@ -288,35 +288,35 @@ <% for (const lotOccupancy of lot.lotOccupancies) { %> <% const isActive = !(lotOccupancy.occupancyEndDate && lotOccupancy.occupancyEndDate < currentDate); %>
End Date
- <%= (lotOccupancy.occupancyEndDateString === "" ? "(No End Date)" : lotOccupancy.occupancyEndDateString) %>
+ <% if (lotOccupancy.occupancyEndDateString === "") { %>
+ (No End Date)
+ <% } else { %>
+ <%= lotOccupancy.occupancyEndDateString %>
+ <% } %>