Commit 9c56009e authored by Rafi Baum's avatar Rafi Baum

[rdb18] Add profile image uploading

parent 20a3a16d
Pipeline #152576 passed with stages
in 1 minute and 58 seconds
......@@ -37,7 +37,14 @@ public class ProfileEndpoint {
userFriends.add(friend);
user.setFriends(userFriends);
profileRepository.save(user);
return new ResponseEntity<HttpStatus>(HttpStatus.OK);
return new ResponseEntity<>(HttpStatus.OK);
}
@GetMapping("/users/image")
public ResponseEntity<HttpStatus> addImage(@RequestParam("user") String userEmail, @RequestParam("image") String imageUrl) {
Profile user = profileRepository.findByEmail(userEmail);
user.setPhoto(imageUrl);
profileRepository.save(user);
return new ResponseEntity<>(HttpStatus.OK);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment