Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

  • changeUserPassword(req: Request, res: Response): Promise<void>
  • async

    Changes the password of a user
    Corresponding API-Call: POST /user/changePassword

    Parameters

    • req: Request

      Received request object

    • res: Response

      Received response object

    Returns Promise<void>

  • deleteUser(req: Request, res: Response): Promise<void>
  • async

    Deletes the user with the given username and id
    Corresponding API-Call: POST /user/delete

    Parameters

    • req: Request

      Received request object

    • res: Response

      Received response object

    Returns Promise<void>

  • getAllUsers(req: Request, res: Response): Promise<void>
  • async

    Get all users from the repository
    Corresponding API-Call: POST /user/getAll

    Parameters

    • req: Request

      Received request object

    • res: Response

      Received response object

    Returns Promise<void>

  • loginUser(req: Request, res: Response): Promise<void>
  • async

    Tries to login a user with the given credentials
    Corresponding API-Call: POST /user/login

    throws

    HTTP-Status 403 and "Wrong username or password" - Invalid username or wrong password

    Parameters

    • req: Request

      Received request object

    • res: Response

      Received response object

    Returns Promise<void>

    HTTP-Status 200 and JWT

  • registerUser(req: Request, res: Response): Promise<void>
  • async

    Registers a new User with the data given by the HTTP-Request
    Corresponding API-Call: POST /user/register

    Parameters

    • req: Request

      Holds the data from the HTTP-Request

    • res: Response

      Used to form the response

    Returns Promise<void>

Generated using TypeDoc