aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com/juick/server/api
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server/src/main/java/com/juick/server/api')
-rw-r--r--juick-server/src/main/java/com/juick/server/api/Index.java7
-rw-r--r--juick-server/src/main/java/com/juick/server/api/Users.java3
2 files changed, 2 insertions, 8 deletions
diff --git a/juick-server/src/main/java/com/juick/server/api/Index.java b/juick-server/src/main/java/com/juick/server/api/Index.java
index 947ac920..56f01370 100644
--- a/juick-server/src/main/java/com/juick/server/api/Index.java
+++ b/juick-server/src/main/java/com/juick/server/api/Index.java
@@ -19,8 +19,6 @@ package com.juick.server.api;
import com.juick.Status;
import com.juick.server.WebsocketManager;
-import com.juick.server.XMPPServer;
-import com.juick.server.xmpp.helpers.XMPPStatus;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
@@ -28,27 +26,26 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.support.ServletUriComponentsBuilder;
-import rocks.xmpp.addr.Jid;
import springfox.documentation.annotations.ApiIgnore;
import javax.inject.Inject;
import java.net.URI;
-import java.util.stream.Collectors;
/**
* Created by vitalyster on 25.07.2016.
*/
-@ApiIgnore
@RestController
public class Index {
@Inject
private WebsocketManager wsHandler;
+ @ApiIgnore
@RequestMapping(value = { "/api/", "/ws/" }, method = RequestMethod.GET, headers = "Connection!=Upgrade")
public ResponseEntity<Void> description() {
URI redirectUri = ServletUriComponentsBuilder.fromCurrentRequestUri().path("/swagger-ui.html").build().toUri();
return ResponseEntity.status(HttpStatus.MOVED_PERMANENTLY).location(redirectUri).build();
}
+ @ApiIgnore
@RequestMapping(value = "/api/status", method = RequestMethod.GET,
produces = MediaType.APPLICATION_JSON_UTF8_VALUE, headers = "Connection!=Upgrade")
public Status status() {
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 7f29a327..de5c05c2 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
@@ -28,7 +28,6 @@ import com.juick.service.MessagesService;
import com.juick.service.UserService;
import com.juick.server.util.UserUtils;
import com.juick.server.util.WebUtils;
-import io.swagger.annotations.ApiOperation;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
@@ -51,7 +50,6 @@ public class Users {
@Inject
private EmailService emailService;
- @ApiOperation(value = "This returns user token", notes = "Pass login and password using HTTP Basic")
@RequestMapping(value = "/api/auth", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public String getAuthToken() {
return userService.getHashByUID(UserUtils.getCurrentUser().getUid());
@@ -143,7 +141,6 @@ public class Users {
throw new HttpNotFoundException();
}
- @ApiOperation(value = "This returns detailed user info")
@GetMapping("/api/info/{uname}")
public UserInfo getUserInfo(@PathVariable String uname) {
User user = userService.getUserByName(uname);