diff options
Diffstat (limited to 'ufund-api/src/main/java/com')
| -rw-r--r-- | ufund-api/src/main/java/com/ufund/api/ufundapi/controller/CupboardController.java | 2 | ||||
| -rw-r--r-- | ufund-api/src/main/java/com/ufund/api/ufundapi/service/AuthService.java | 8 | 
2 files changed, 5 insertions, 5 deletions
diff --git a/ufund-api/src/main/java/com/ufund/api/ufundapi/controller/CupboardController.java b/ufund-api/src/main/java/com/ufund/api/ufundapi/controller/CupboardController.java index 4bad4b9..bffc9ec 100644 --- a/ufund-api/src/main/java/com/ufund/api/ufundapi/controller/CupboardController.java +++ b/ufund-api/src/main/java/com/ufund/api/ufundapi/controller/CupboardController.java @@ -52,7 +52,7 @@ public class CupboardController {          System.out.println(params);          String name = (String) params.get("name");          int maxGoal = (int) params.get("maxGoal"); -        Need.GoalType goalType = GoalType.valueOf((String) params.get("goalType")); +        Need.GoalType goalType = GoalType.valueOf((String) params.get("type"));          try {              Need need = cupboardService.createNeed(name, maxGoal, goalType); diff --git a/ufund-api/src/main/java/com/ufund/api/ufundapi/service/AuthService.java b/ufund-api/src/main/java/com/ufund/api/ufundapi/service/AuthService.java index c847cac..87a16a6 100644 --- a/ufund-api/src/main/java/com/ufund/api/ufundapi/service/AuthService.java +++ b/ufund-api/src/main/java/com/ufund/api/ufundapi/service/AuthService.java @@ -26,10 +26,10 @@ public class AuthService {       * @throws IllegalAccessException Thrown if access was denied to the user.       */      public void authenticate(String targetUsername, String key) throws IllegalAccessException, IOException { -//        var userAuth = userAuthDAO.getUserAuth(key); -//        if (userAuth == null) { -//            throw new IllegalAccessException("Unauthenticated"); -//        } +        var userAuth = userAuthDAO.getUserAuth(key); +        if (userAuth == null) { +            throw new IllegalAccessException("Unauthenticated"); +        }  //  //        var username = userAuth.getUsername();  //        var userType = userService.getUser(username).getType();  | 
