Methods
#
(async, inner) verifyActivated(req, res, next)
Verifies whether the user requesting the route is activated.
Parameters:
| Name |
Type |
Description |
req |
Object
|
Express request object. |
res |
Object
|
Express response object. |
next |
function
|
Express next function. |
#
(async, inner) verifyAdmin(req, res, next)
Verifies whether the user requesting the route is the admin of that site
Parameters:
| Name |
Type |
Description |
req |
Object
|
Express request object. |
res |
Object
|
Express response object. |
next |
function
|
Express next function. |
#
(async, inner) verifyShift(req, res, next)
Verifies that the user requesting a shift owns that shift.
Route parameters required: shiftId
Parameters:
| Name |
Type |
Description |
req |
Object
|
Express request object. |
res |
Object
|
Express response object. |
next |
function
|
Express next function. |
#
(async, inner) verifyShiftSub(req, res, next)
Verifies that the user requesting a shift is a sub for that shift.
Route parameters required: shiftId
Parameters:
| Name |
Type |
Description |
req |
Object
|
Express request object. |
res |
Object
|
Express response object. |
next |
function
|
Express next function. |
#
(async, inner) verifyToken(req, res, next)
Verifies that the user requesting the route is authenticated.
Parameters:
| Name |
Type |
Description |
req |
Object
|
Express request object. |
res |
Object
|
Express response object. |
next |
function
|
Express next function. |
#
(async, inner) verifyUser(req, res, next)
Verifies that the user requesting update of a resource is the same as the user that owns the resource.
Route parameters required: userId
Parameters:
| Name |
Type |
Description |
req |
Object
|
Express request object. |
res |
Object
|
Express response object. |
next |
function
|
Express next function. |