aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/www/api/Users.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2021-09-06 22:53:43 +0300
committerGravatar Vitaly Takmazov2021-09-06 22:53:43 +0300
commitf4e913a8adbcb4573efe469d847dbb5506da91ff (patch)
tree94c16a0287d3f658d0d8b01c25f354d87b90a090 /src/main/java/com/juick/www/api/Users.java
parentbb1afa817b5547ba56c3b161f4b10bc4bc88aed8 (diff)
Cleanup ResponseEntity usage
Diffstat (limited to 'src/main/java/com/juick/www/api/Users.java')
-rw-r--r--src/main/java/com/juick/www/api/Users.java7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/main/java/com/juick/www/api/Users.java b/src/main/java/com/juick/www/api/Users.java
index 030d8ced..06d040ff 100644
--- a/src/main/java/com/juick/www/api/Users.java
+++ b/src/main/java/com/juick/www/api/Users.java
@@ -35,7 +35,6 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.http.MediaType;
-import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
@@ -120,7 +119,7 @@ public class Users {
return (SecureUser)userService.getUserInfo(me);
}
@PostMapping("/api/me")
- public ResponseEntity<Void> updateMe(@Visitor User visitor,
+ public void updateMe(@Visitor User visitor,
@RequestParam(required = false) String password,
@RequestParam(value = "jid-del", required = false) String jidForDeletion,
@RequestParam(value = "email-add", required = false) String newEmail,
@@ -162,13 +161,11 @@ public class Users {
break;
}
}
- return ResponseEntity.ok().build();
}
@PostMapping("/api/me/subscribe")
- public ResponseEntity<Void> subscribeMe(@Visitor User visitor, String email) {
+ public void subscribeMe(@Visitor User visitor, String email) {
// TODO: check status
emailService.setNotificationsEmail(visitor.getUid(), email);
- return ResponseEntity.ok().build();
}
@PostMapping("/api/me/upload")
public void updateInfo(@Visitor User visitor,