-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
47 changed files
with
526 additions
and
416 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
/// <reference types="cookie-parser" /> | ||
import type { Request, Response } from 'express'; | ||
export default function handler(request: Request, response: Response): Promise<void>; | ||
export interface PlatesViewParameters { | ||
licencePlateCountry: '_' | string; | ||
licencePlateProvince: '_' | string; | ||
licencePlateNumber: '_' | string; | ||
} | ||
export default function handler(request: Request<PlatesViewParameters>, response: Response): Promise<void>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
/// <reference types="cookie-parser" /> | ||
import type { Request, Response } from 'express'; | ||
export default function handler(request: Request, response: Response): void; | ||
export interface TicketsByTicketNumberParameters { | ||
ticketNumber: string; | ||
} | ||
export default function handler(request: Request<TicketsByTicketNumberParameters>, response: Response): void; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
import getParkingTicketId from '../../database/parkingDB/getParkingTicketId.js'; | ||
import { getConfigProperty } from '../../helpers/functions.config.js'; | ||
const urlPrefix = getConfigProperty('reverseProxy.urlPrefix'); | ||
export default function handler(request, response) { | ||
const ticketNumber = request.params.ticketNumber; | ||
const ticketId = getParkingTicketId(ticketNumber); | ||
if (ticketId === undefined) { | ||
response.redirect('/tickets/?error=ticketNotFound'); | ||
response.redirect(`${urlPrefix}/tickets/?error=ticketNotFound`); | ||
} | ||
else { | ||
response.redirect(`/tickets/${ticketId.toString()}`); | ||
response.redirect(`${urlPrefix}/tickets/${ticketId.toString()}`); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,25 @@ | ||
import type { Request, Response } from 'express' | ||
|
||
import getParkingTicketId from '../../database/parkingDB/getParkingTicketId.js' | ||
import { getConfigProperty } from '../../helpers/functions.config.js' | ||
|
||
export default function handler(request: Request, response: Response): void { | ||
const urlPrefix = getConfigProperty('reverseProxy.urlPrefix') | ||
|
||
export interface TicketsByTicketNumberParameters { | ||
ticketNumber: string | ||
} | ||
|
||
export default function handler( | ||
request: Request<TicketsByTicketNumberParameters>, | ||
response: Response | ||
): void { | ||
const ticketNumber = request.params.ticketNumber | ||
|
||
const ticketId = getParkingTicketId(ticketNumber) | ||
|
||
if (ticketId === undefined) { | ||
response.redirect('/tickets/?error=ticketNotFound') | ||
response.redirect(`${urlPrefix}/tickets/?error=ticketNotFound`) | ||
} else { | ||
response.redirect(`/tickets/${ticketId.toString()}`) | ||
response.redirect(`${urlPrefix}/tickets/${ticketId.toString()}`) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
/// <reference types="cookie-parser" /> | ||
import type { Request, Response } from 'express'; | ||
export default function handler(request: Request, response: Response): void; | ||
export interface TicketsConvictPrintParameters { | ||
batchId: `${number}`; | ||
} | ||
export default function handler(request: Request<TicketsConvictPrintParameters>, response: Response): void; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
/// <reference types="cookie-parser" /> | ||
import type { Request, Response } from 'express'; | ||
export default function handler(request: Request, response: Response): Promise<void>; | ||
export interface TicketsEditParameters { | ||
ticketId: `${number}`; | ||
} | ||
export default function handler(request: Request<TicketsEditParameters>, response: Response): Promise<void>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
/// <reference types="cookie-parser" /> | ||
import type { Request, Response } from 'express'; | ||
export default function handler(request: Request, response: Response): Promise<void>; | ||
export interface TicketsPrintParameters { | ||
ticketId: `${number}`; | ||
} | ||
export default function handler(request: Request<TicketsPrintParameters>, response: Response): Promise<void>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
/// <reference types="cookie-parser" /> | ||
import type { Request, Response } from 'express'; | ||
export default function handler(request: Request, response: Response): Promise<void>; | ||
export interface TicketsViewParameters { | ||
ticketId: `${number}`; | ||
} | ||
export default function handler(request: Request<TicketsViewParameters>, response: Response): Promise<void>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
/// <reference types="cookie-parser" /> | ||
import type { Request, Response } from 'express'; | ||
export default function handler(request: Request, response: Response): void; | ||
export interface DoAddStatusBody { | ||
statusField: string; | ||
statusField2: string; | ||
statusKey: string; | ||
statusNote: string; | ||
ticketId: `${number}`; | ||
resolveTicket?: '1'; | ||
} | ||
export default function handler(request: Request<unknown, unknown, DoAddStatusBody>, response: Response): void; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,14 @@ | ||
/// <reference types="cookie-parser" /> | ||
import type { Request, Response } from 'express'; | ||
import { type GetParkingTicketsReturn } from '../../database/parkingDB/getParkingTickets.js'; | ||
interface DoGetTicketsBody { | ||
isResolved: '' | '0' | '1'; | ||
licencePlateNumber: string; | ||
limit: `${number}`; | ||
location: string; | ||
offset: `${number}`; | ||
ticketNumber: string; | ||
} | ||
export type DoGetTicketsResponse = GetParkingTicketsReturn; | ||
export default function handler(request: Request, response: Response): void; | ||
export default function handler(request: Request<unknown, unknown, DoGetTicketsBody>, response: Response<DoGetTicketsResponse>): void; | ||
export {}; |
Oops, something went wrong.