Class: Teams

Teams()

Teams Controller ------------------------------------------------------------- This controller contains logic related to viewing and managing the user's team, team lineups, and team players.

Constructor

new Teams()

Source:

Extends

  • Controller

Methods

(async) create_team(req, res) → {Promise.<*>}

API endpoint for creating a new team.
Parameters:
Name Type Description
req
res
Source:
To Do:
  • remove this - happens automatically per-user
Returns:
Type
Promise.<*>

(async) get_my_team(req, res, next) → {Promise.<void>}

Return the API data for the current user's team. Requires an authenticated user.
Parameters:
Name Type Description
req
res
next
Source:
Returns:
Type
Promise.<void>

(async) get_my_team_current_lineup(req, res, next) → {Promise.<*>}

Return the API data for the current lineup for the current user's team.
Parameters:
Name Type Description
req
res
next
Source:
Returns:
Type
Promise.<*>

(async) get_my_team_players(req, res, next) → {Promise.<*>}

Return the API data for the players on the current user's team.
Parameters:
Name Type Description
req
res
next
Source:
Returns:
Type
Promise.<*>

(async) list_all_teams(req, res) → {Promise.<*>}

Return the API data for a list of all teams.
Parameters:
Name Type Description
req
res
Source:
Returns:
Type
Promise.<*>

(async) save_my_team(req, res, next) → {Promise.<*>}

Save changes to the current user's team and return it as API data.
Parameters:
Name Type Description
req
res
next
Source:
Returns:
Type
Promise.<*>

(async) save_my_team_lineup(req, res, next) → {Promise.<void>}

Saves the lineup for the current user's team and returns it as API data.
Parameters:
Name Type Description
req
res
next
Source:
Returns:
Type
Promise.<void>