diff options
author | Vitaly Takmazov | 2023-01-04 03:38:19 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2023-01-04 05:46:16 +0300 |
commit | c471503ede9aad91193ff6f93966196e6aff15d6 (patch) | |
tree | 8c70c8f58b140465be651cd019f26eadd476711f /src/main/java/com/juick/www/controllers/Settings.java | |
parent | 086d9a7625bfc5a386f5b1028d364fb546c2fa9d (diff) |
OAuth authentication for Mastodon and ActivityPub C2S
Diffstat (limited to 'src/main/java/com/juick/www/controllers/Settings.java')
-rw-r--r-- | src/main/java/com/juick/www/controllers/Settings.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/com/juick/www/controllers/Settings.java b/src/main/java/com/juick/www/controllers/Settings.java index b990bf41..4d7deece 100644 --- a/src/main/java/com/juick/www/controllers/Settings.java +++ b/src/main/java/com/juick/www/controllers/Settings.java @@ -35,7 +35,6 @@ import com.juick.service.TagService; import com.juick.service.TelegramService; import com.juick.service.UserService; import com.juick.service.activities.UpdateUserEvent; -import com.juick.service.security.annotation.Visitor; import com.juick.util.HttpBadRequestException; import com.juick.util.HttpUtils; import com.juick.www.WebApp; @@ -58,6 +57,7 @@ import org.springframework.context.ApplicationEventPublisher; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.multipart.MultipartFile; @@ -89,7 +89,7 @@ public class Settings { @GetMapping("/settings") protected String doGet( - @Visitor User visitor, + @ModelAttribute User visitor, Locale locale, @RequestParam(required = false, defaultValue = "main") String page, @RequestParam(required = false) String code, ModelMap model) throws IOException { @@ -126,7 +126,7 @@ public class Settings { @PostMapping("/settings") protected String doPost( - @Visitor User visitor, + @ModelAttribute User visitor, HttpServletRequest request, HttpServletResponse response, @RequestParam(required = false) MultipartFile avatar, ModelMap model) @@ -272,7 +272,7 @@ public class Settings { } @PostMapping("/settings/unsubscribe") public String unsubscribeOneClick( - @Visitor User user, + @ModelAttribute User user, @RequestParam(name = "List-Unsubscribe") String unsubscribe, ModelMap model) { if (!user.isAnonymous()) { |