Closed TheTedder closed 1 month ago
DELETE /leaderboard/{id} where id is a long.
DELETE
/leaderboard/{id}
id
The server must return a 401 error if the client is not authenticated.
The server must return a 403 error if the current user's role is not ADMIN.
ADMIN
The server must return a 404 error if the given ID does not correspond to a leaderboard in the database.
The server must return a 404 error if the given ID corresponds to a leaderboard that is already deleted.
The server may use a response body to disambiguate between the two different scenarios that can generate a 404 error.
Upon a successful deletion, the server must set the DeletedAt field of the corresponding leaderboard to the current time and return a 204 status code.
DeletedAt
DELETE
/leaderboard/{id}
whereid
is a long.The server must return a 401 error if the client is not authenticated.
The server must return a 403 error if the current user's role is not
ADMIN
.The server must return a 404 error if the given ID does not correspond to a leaderboard in the database.
The server must return a 404 error if the given ID corresponds to a leaderboard that is already deleted.
The server may use a response body to disambiguate between the two different scenarios that can generate a 404 error.
Upon a successful deletion, the server must set the
DeletedAt
field of the corresponding leaderboard to the current time and return a 204 status code.