AC:
- Add
/api/admin/leaderboard/current with PUT mapping
- This endpoint should accept
String name and String syntaxHighlightingLanguage and OffsetDateTime shouldExpireBy (keep in mind that Spring has some magic that can automatically convert the body to a class, you can use CreateAnnouncementBody as an example)
- Validate the same rules as we do in
createAnnouncement to ensure that everything is valid
- Please use the new validation logic instead of the annotations or manually coding it into the controller. You can find an example at
JoinLobbyBody.java. Once you define that method the same way, simply call body.validate() within the controller as early as possible
- For authentication you can use this guide to help you: https://github.com/tahminator/codebloom/tree/main/src#annotation
- This should then update the db entry with the new fields by looking up the most recent leaderboard and if it exists, update
- Add manual screenshots (can trigger via Swagger) in local & staging ensuring that it works