diff options
author | Vitaly Takmazov | 2021-10-21 22:52:14 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2021-10-21 22:52:14 +0300 |
commit | c6972c05dcee19afb5725767f755a56f5162aee2 (patch) | |
tree | 64b8f3588e97d8e1141fc17646e99a11f57abe46 /src/main/java/com/juick/www/api/Notifications.java | |
parent | cfb6c1894d8223eac62d03eeececa7baf192aced (diff) |
Make popular feed equal to service user recommendations feed to have correct RSS feeds
Diffstat (limited to 'src/main/java/com/juick/www/api/Notifications.java')
-rw-r--r-- | src/main/java/com/juick/www/api/Notifications.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/com/juick/www/api/Notifications.java b/src/main/java/com/juick/www/api/Notifications.java index d00fe4ca..613e6cfc 100644 --- a/src/main/java/com/juick/www/api/Notifications.java +++ b/src/main/java/com/juick/www/api/Notifications.java @@ -63,8 +63,8 @@ public class Notifications { private UserService userService; @Inject private TelegramService telegramService; - @Value("${api_user:juick}") - private String serviceUser; + @Inject + private User serviceUser; private User collectTokens(Integer uid) { User user = userService.getUserByUID(uid).orElse(AnonymousUser.INSTANCE); @@ -90,7 +90,7 @@ public class Notifications { @RequestParam(required = false, defaultValue = "0") int uid, @RequestParam(required = false, defaultValue = "0") int mid, @RequestParam(required = false, defaultValue = "0") int rid) { - if (!(visitor.getName().equals(serviceUser))) { + if (!(visitor.equals(serviceUser))) { throw new HttpForbiddenException(); } if (uid > 0 && mid == 0) { @@ -127,7 +127,7 @@ public class Notifications { public Status doDelete( @Visitor User visitor, @RequestBody List<ExternalToken> list) { - if (!visitor.getName().equals(serviceUser)) { + if (!visitor.equals(serviceUser)) { throw new HttpForbiddenException(); } list.forEach(t -> { @@ -153,7 +153,7 @@ public class Notifications { public Status doDeleteTokens( @Visitor User visitor, @RequestBody List<ExternalToken> list) { - if (!visitor.getName().equals(serviceUser)) { + if (!visitor.equals(serviceUser)) { throw new HttpForbiddenException(); } list.forEach(t -> { |