Bug fix: getPicture Endpoint
LocationBasedServices/sumoc-backend/pipeline/pr-main Build queued...
LocationBasedServices/sumoc-backend/pipeline/head This commit looks good

- got error that object was too large for transaction ... again
This commit is contained in:
Elias Harb
2026-02-25 01:55:10 +01:00
parent 7c347caea9
commit 932fc88b2e
@@ -233,16 +233,15 @@ public class UserController {
@ApiResponse(responseCode = "403", description = "Only authorized persons may see the profiles picture"),
@ApiResponse(responseCode = "404", description = "The user does not exist")
})
@GetMapping("/getProfilePicture/{id}")
@GetMapping(value = "/getProfilePicture/{id}", produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<ImageRequestDTO> getProfilePicture(@PathVariable @NotNull Long id) {
ImageRequestDTO imageData = userService.getProfilePicture(id);
return ResponseEntity.ok()
.contentType(MediaType.IMAGE_JPEG)
.contentType(MediaType.APPLICATION_JSON)
.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",