AccountController

@RestController
@RequestMapping(value = "/api/account")
open class AccountController

REST endpoints for account management.

See also

ProfilePictureOperations
ProductUserService
SessionService

Constructors

Link copied to clipboard
@Autowired
constructor(@NotNull sessionService: @NotNull SessionService, @NotNull profilePictureService: @NotNull ProfilePictureOperations, @NotNull productUserService: @NotNull ProductUserService)
REST endpoints for account management.

Functions

Link copied to clipboard
@Transactional
@GetMapping(value = "/get/{id}/profile-picture")
@NotNull
open fun getProfilePicture(@Nullable @PathVariable id: @Nullable String): @NotNull ResponseEntity<Array<Byte>>
Retrieves the profile picture for a user given their ID.
Link copied to clipboard
@GetMapping(value = "/get/{id}/has-profile-picture")
@NotNull
open fun hasProfilePicture(@Nullable @PathVariable id: @Nullable String): @NotNull ResponseEntity<HasProfilePictureResponse>
Verifies if a user has a profile picture based on their ID.
Link copied to clipboard
@PostMapping(value = "/image/upload")
@NotNull
open fun uploadProfilePicture(@NotNull @RequestParam(value = "file") file: @NotNull MultipartFile, @NotNull session: @NotNull HttpSession): @NotNull ResponseEntity<OperationSuccessfulResponse>
Handles uploading profile pictures for authenticated users.