Created
August 29, 2020 14:38
-
-
Save itsgokhanyilmaz/a30c2363efb68b3acab62a4df154fbf8 to your computer and use it in GitHub Desktop.
UserController
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RestController | |
@RequestMapping("/user") | |
@RequiredArgsConstructor | |
public class UserController { | |
private final UserService userService; | |
@PostMapping("upload-profile-picture") | |
public ResponseEntity<MainResponse<UserResponse>> writeBlobFile(@RequestParam(value = "image", required = false) MultipartFile file, HttpServletRequest httpServletRequest) throws IOException { | |
String userId = JwtUtil.getObjectIdFromRequest(httpServletRequest); | |
return ResponseUtil.data(userService.uploadProfilePicture(file, userId)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment