Teams with Codes

Options
brian
brian Administrator

ADMIN

edited December 2022 in ✂️ Snippets

Create teams that users can join with a unique, randomly generated "team code."

It features:

  • Custom function - make_team_code: generates a unique, 8 character code
  • POST /create_team: create a new team with a unique team_code
  • GET /team_code: find a team using a team_code
  • GET /team_sign_up: add a user to a team using a user_id and team_code

You can use this snippet to learn:

  • How to associate one user with multiple teams (Table Reference: List)
  • How to create a custom function (team_code, make_team_code)
  • How to use Preconditions
  • How to push a value to an array

Feel free to add suggestions, requests, or questions in the comments!

Tagged: