/user/admin

Exports the admin view method for the /api/user/admin route.

Methods

(inner) admin(req, res)

The admin function checks whether the request parameter user has admin priviliges before returnig the View API with the admin view as template.

Parameters:
NameTypeDescription
reqObject

HTTP request.

resObject

HTTP response.

req.paramsObject

Request parameter.

Properties
NameTypeDescription
userObject

Requesting user.

Properties
NameTypeDescription
adminboolean

Requesting user is admin.