aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server/src/main')
-rw-r--r--juick-server/src/main/java/com/juick/server/api/Users.java28
1 files changed, 28 insertions, 0 deletions
diff --git a/juick-server/src/main/java/com/juick/server/api/Users.java b/juick-server/src/main/java/com/juick/server/api/Users.java
index 1258e43c..c91581a0 100644
--- a/juick-server/src/main/java/com/juick/server/api/Users.java
+++ b/juick-server/src/main/java/com/juick/server/api/Users.java
@@ -18,9 +18,12 @@
package com.juick.server.api;
import com.juick.User;
+import com.juick.server.helpers.ApplicationStatus;
import com.juick.server.helpers.UserInfo;
import com.juick.server.util.HttpForbiddenException;
import com.juick.server.util.HttpNotFoundException;
+import com.juick.service.CrosspostService;
+import com.juick.service.EmailService;
import com.juick.service.MessagesService;
import com.juick.service.UserService;
import com.juick.server.util.UserUtils;
@@ -43,6 +46,10 @@ public class Users {
private UserService userService;
@Inject
private MessagesService messagesService;
+ @Inject
+ private CrosspostService crosspostService;
+ @Inject
+ private EmailService emailService;
@ApiOperation(value = "This returns user token", notes = "Pass login and password using HTTP Basic")
@RequestMapping(value = "/auth", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@@ -150,5 +157,26 @@ public class Users {
public String getHash() {
return getAuthHash();
}
+ public UserInfo getUserInfo() {
+ return userService.getUserInfo(this);
+ }
+ public List<String> getJIDs() {
+ return userService.getAllJIDs(this);
+ }
+ public List<String> getEmails() {
+ return userService.getEmails(this);
+ }
+ public String getActiveEmail() {
+ return emailService.getNotificationsEmail(this.getUid());
+ }
+ public String getTwitterName() {
+ return crosspostService.getTwitterName(this.getUid());
+ }
+ public String getTelegramName() {
+ return crosspostService.getTelegramName(this.getUid());
+ }
+ public ApplicationStatus getFacebookStatus() {
+ return crosspostService.getFbCrossPostStatus(this.getUid());
+ }
}
}