Module: usersController

Controller for all user functions
Source:

Methods

(static) getSignIn(req, res, next)

Renders views/sign-in.pug
Parameters:
Name Type Description
req Request The req object represents the HTTP request and has properties for the request query string, parameters, body, HTTP headers, and so on
res Response The res object represents the HTTP response that an Express app sends when it gets an HTTP request.
next * Control to the next handler
Source:
Returns:
str rendered HTML string

(static) getSignUp(req, res, next)

Gets all platforms and renders views/sign-up.pug
Parameters:
Name Type Description
req Request The req object represents the HTTP request and has properties for the request query string, parameters, body, HTTP headers, and so on
res Response The res object represents the HTTP response that an Express app sends when it gets an HTTP request.
next * Control to the next handler
Source:
Returns:
str rendered HTML string

(static) logout(req, res, next)

POST-Request logout current user
Parameters:
Name Type Description
req Request The req object represents the HTTP request and has properties for the request query string, parameters, body, HTTP headers, and so on
res Response The res object represents the HTTP response that an Express app sends when it gets an HTTP request.
next * Control to the next handler
Source:
Returns:
Redirect Redirect to /index.html

(static) signIn(req, res, next)

POST-Request to sign in
Parameters:
Name Type Description
req Request The req object represents the HTTP request and has properties for the request query string, parameters, body, HTTP headers, and so on
res Response The res object represents the HTTP response that an Express app sends when it gets an HTTP request.
next * Control to the next handler
Source:
Returns:
(str|Redirect) JSON with more infos or Redirect to /gaming/ if already logged in

(static) signUp(req, res, next)

POST-Request create a new user
Parameters:
Name Type Description
req Request The req object represents the HTTP request and has properties for the request query string, parameters, body, HTTP headers, and so on
res Response The res object represents the HTTP response that an Express app sends when it gets an HTTP request.
next * Control to the next handler
Source:
Returns:
(str|Redirect) JSON with more infos or Redirect to /gaming/ if already logged in