Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Leaderboard Endpoint #223

Closed
1 of 2 tasks
Tracked by #238
TheTedder opened this issue Aug 11, 2024 · 0 comments · Fixed by #248
Closed
1 of 2 tasks
Tracked by #238

Create Leaderboard Endpoint #223

TheTedder opened this issue Aug 11, 2024 · 0 comments · Fixed by #248
Assignees
Labels
enhancement New feature or request high priority
Milestone

Comments

@TheTedder
Copy link
Contributor

TheTedder commented Aug 11, 2024

POST /leaderboards/create.

The request body includes the following fields:

  • Name: string
  • Slug: string
  • Info: string?

The server returns a 401 error if the client is not authenticated.

The server returns a 403 error if the current user's role is not ADMIN.

The server returns a 409 error if the provided slug is already in use.

The server returns a 422 error if

  • slug is not between 2 and 80 characters inclusive.
  • the slug is not comprised solely of alphanumeric digits, hyphens, and underscores.
  • Name is absent or null.
  • Slug is absent or null.

Upon succesful leaderboard creation, the server returns 201 CREATED status and a response body that includes the newly-created leaderboard as well as its location on the server.

Tasks

  1. bug
  2. question
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request high priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant