Skip to content

Commit

Permalink
Fix sign-up url and update logging levels
Browse files Browse the repository at this point in the history
  • Loading branch information
AO-StreetArt committed Dec 13, 2018
1 parent f7bd540 commit f0542ab
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/ao/adrestia/controller/UsersController.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("v1/users")
@RequestMapping("users")
public class UsersController {
private static Logger log = LoggerFactory.getLogger("adrestia.UserController");

Expand All @@ -56,7 +56,7 @@ public ResponseEntity<String> signUp(@RequestBody ApplicationUser user) {
// Detect any existing users
List<ApplicationUser> existingUsers = applicationUserRepository.findByUsername(user.username);
if (existingUsers.size() > 0) {
log.info("Sign-up requested for existing user");
log.warn("Sign-up requested for existing user");
returnCode = HttpStatus.CONFLICT;
} else {
log.info("Signing up new User: {}", user.username);
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/com/ao/adrestia/filters/RoutingFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public Object run() {
// Find URL path information
String urlTail = currentReq.getRequestURI();
String newTail = urlTail;
log.info("Filtering URL: {}", newTail);
log.debug("Filtering URL: {}", newTail);
String[] parsedUrlList = urlTail.split(Pattern.quote("?"), 2);
String[] initialUrlPathList = parsedUrlList[0].split(Pattern.quote("/"), 0);
String[] urlPathList = null;
Expand Down Expand Up @@ -147,7 +147,7 @@ public Object run() {
// Object or property request, so route to CLyman
ServiceInstance targetInstance = discoveryClient.findClyman(urlPathList[2]);
if (targetInstance != null) {
log.info("Routing Request to {}", targetInstance.getHost());
log.debug("Routing Request to {}", targetInstance.getHost());
hostname = targetInstance.getHost();
port = targetInstance.getPort();
isClymanRequest = true;
Expand All @@ -163,7 +163,7 @@ public Object run() {
// We have a Scene Request, so route to Crazy Ivan
ServiceInstance targetInstance = discoveryClient.findCrazyIvan();
if (targetInstance != null) {
log.info("Routing Request to {}", targetInstance.getHost());
log.debug("Routing Request to {}", targetInstance.getHost());
hostname = targetInstance.getHost();
port = targetInstance.getPort();
isIvanRequest = true;
Expand All @@ -181,7 +181,7 @@ public Object run() {
// We have an asset request, so route to AVC
ServiceInstance targetInstance = discoveryClient.findAvc();
if (targetInstance != null) {
log.info("Routing Request to {}", targetInstance.getHost());
log.debug("Routing Request to {}", targetInstance.getHost());
hostname = targetInstance.getHost();
port = targetInstance.getPort();
isAvcRequest = true;
Expand All @@ -190,7 +190,7 @@ public Object run() {
// We have a project request, so route to the Projects service
ServiceInstance targetInstance = discoveryClient.findProjectService();
if (targetInstance != null) {
log.info("Routing Request to {}", targetInstance.getHost());
log.debug("Routing Request to {}", targetInstance.getHost());
hostname = targetInstance.getHost();
port = targetInstance.getPort();
isProjectRequest = true;
Expand Down

0 comments on commit f0542ab

Please sign in to comment.