Class ProfilePictureController
- java.lang.Object
-
- edu.cnm.deepdive.albuquirky.controller.ProfilePictureController
-
@RestController @RequestMapping("/profile_pictures") @ExposesResourceFor(ProfilePicture.class) public class ProfilePictureController extends ObjectThe ImageController class is the @RestController that maps the endpoints of "/images" for the communication between the server-side and client-side forProfilePicture.
-
-
Constructor Summary
Constructors Constructor Description ProfilePictureController(ProfileService profileService, ProfilePictureService profilePictureService)The constructor initializes an instance ofProfileServiceandProfilePictureService.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProfilePicturegetUserProfilePicture(long id, org.springframework.security.core.Authentication auth)The Get method which returns aProfilePicturefor a specified user.
-
-
-
Constructor Detail
-
ProfilePictureController
@Autowired public ProfilePictureController(ProfileService profileService, ProfilePictureService profilePictureService)
The constructor initializes an instance ofProfileServiceandProfilePictureService.- Parameters:
profileService- TheProfileServiceto initialize.profilePictureService- TheProfilePictureServiceto initialize.
-
-
Method Detail
-
getUserProfilePicture
@GetMapping(produces="application/json") public ProfilePicture getUserProfilePicture(@PathVariable long id, org.springframework.security.core.Authentication auth)
The Get method which returns aProfilePicturefor a specified user.- Parameters:
id- The ID of theProfile.auth- The user authentication.- Returns:
- The matching
ProfilePicture.
-
-