aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/www/api/Service.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/juick/www/api/Service.java')
-rw-r--r--src/main/java/com/juick/www/api/Service.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/com/juick/www/api/Service.java b/src/main/java/com/juick/www/api/Service.java
index f4599a56..1e3dcdc8 100644
--- a/src/main/java/com/juick/www/api/Service.java
+++ b/src/main/java/com/juick/www/api/Service.java
@@ -31,6 +31,7 @@ import com.juick.service.StorageService;
import com.juick.service.UserService;
import com.juick.service.component.AccountVerificationEvent;
import io.swagger.v3.oas.annotations.Hidden;
+import io.swagger.v3.oas.annotations.Parameter;
import jakarta.mail.Session;
import jakarta.mail.internet.AddressException;
import jakarta.mail.internet.InternetAddress;
@@ -88,7 +89,7 @@ public class Service {
@Hidden
@PostMapping("/api/mail")
@ResponseStatus(value = HttpStatus.OK)
- public void processMail(@ModelAttribute User current, InputStream data) throws Exception {
+ public void processMail(@Parameter(hidden = true) User current, InputStream data) throws Exception {
if (current.equals(serviceUser)) {
MimeMessage msg = new MimeMessage(session, data);
String[] returnPaths = msg.getHeader("Return-Path");
@@ -203,7 +204,7 @@ public class Service {
@Hidden
@PostMapping("/api/mail/unsubscribe")
@ResponseStatus(value = HttpStatus.OK)
- public void processMailUnsubscribe(@ModelAttribute User current, InputStream data) throws Exception {
+ public void processMailUnsubscribe(@Parameter(hidden = true) User current, InputStream data) throws Exception {
if (current.equals(serviceUser)) {
MimeMessage msg = new MimeMessage(session, data);
String from = msg.getFrom() == null || msg.getFrom().length > 1
@@ -227,7 +228,7 @@ public class Service {
}
@GetMapping("/api/events")
- public SseEmitter handle(@ModelAttribute User visitor) {
+ public SseEmitter handle(@Parameter(hidden = true) User visitor) {
logger.info("{} connected", visitor.getName());
if (!visitor.isAnonymous()) {
userService.updateLastSeen(visitor);