AccountController

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

REST endpoints for account management.

Author

Oliver Lear Sigwarth

See also

ProfilePictureOperations
ProductUserService
SessionService

Constructors

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

Functions

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