Module hermod_api::handlers[][src]

Expand description

Contains HTTP Handlers that directly receive and respond to requests to the server.

Structs

Enums

Error derived while handling an HTTP request

Functions

get(/qr_code/delete?id={ID}) edits a QR code with the relevant information

get(/qr_code/edit?id={ID}&generation_data={DATA}&slug={SLUG}) edits a QR code with the relevant information

get(form) runs an SQL query on a provided form id and returns a JSON object of the fields

get(qr_code?slug={SLUG}) runs a sample SQL query and checks if the user is logged in

Get(/health_check) returns a 200 to indicate the application is running

get(form/list) runs an SQL query to retrieve all the forms belonging to the user who sent the request

get(/qr_codes) lists QR codes assosciated with a given user

Get(/login) attempts to log a user in, and if successful returns a JWT token

Get(/logout) logs a user out if they are currently logged in

post(form/store) runs an SQL query to store a new form and all its associated fields

get(/qr_code/store?generation_data={DATA}&slug={SLUG}) stores a QR code with the relevant information

Type Definitions