This commit is contained in:
@@ -237,4 +237,19 @@ public class UserController {
|
||||
.cacheControl(CacheControl.maxAge(365, TimeUnit.DAYS))
|
||||
.body(imageData);
|
||||
}
|
||||
|
||||
@Operation(summary = "Get the users own xp", description = "A user can get their own xp.")
|
||||
@ApiResponses(value = {
|
||||
@ApiResponse(responseCode = "200", description = "XP successfully retrieved",
|
||||
content = @Content(mediaType = "application/json")),
|
||||
@ApiResponse(responseCode = "403", description = "Not authorized",
|
||||
content = @Content(mediaType = "application/json")),
|
||||
@ApiResponse(responseCode = "404", description = "The user does not exist",
|
||||
content = @Content(mediaType = "application/json"))
|
||||
})
|
||||
@GetMapping("/getTotalXP")
|
||||
public ResponseEntity<Long> getTotalXP() {
|
||||
Long xp = userService.getTotalXP();
|
||||
return ResponseEntity.ok().body(xp);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user