diff --git a/src/main/java/restImplementation/UserImplementation.java b/src/main/java/restImplementation/UserImplementation.java index 2dacad5..6b54a7a 100644 --- a/src/main/java/restImplementation/UserImplementation.java +++ b/src/main/java/restImplementation/UserImplementation.java @@ -92,7 +92,6 @@ public class UserImplementation { public User getUserWithEmail(String email) throws Exception{ UserDao userDao = new UserDao(); return userDao.getUserWithEmail(dataEncryption.encryptData(email)); - } public User getUserWithPhone(String phone) throws Exception{ diff --git a/src/main/java/restService/UserResource.java b/src/main/java/restService/UserResource.java index 67c684f..86c3fb0 100644 --- a/src/main/java/restService/UserResource.java +++ b/src/main/java/restService/UserResource.java @@ -134,7 +134,7 @@ public class UserResource { try { UserImplementation userImplementation = new UserImplementation(); User r = userImplementation.getUserWithEmail(email); - String response = "{\"name\":\""+r.getName()+"\",\"firstname\":\""+r.getFirstname()+"\",\"user_hash\":\""+r.getUser_hash()+"\"}"; + String response = "{\"name\":\""+r.getName()+"\",\"firstname\":\""+r.getFirstname()+"\",\"user_hash\":\""+r.getUser_hash()+"\",\"approved\":\""+r.isApproved()+"\"}"; return ResponseEntity.status(HttpStatus.OK).body(response); }catch (Exception e){ String r = "{\"response\":\""+e.getMessage()+"\"}"; @@ -148,7 +148,7 @@ public class UserResource { try { UserImplementation userImplementation = new UserImplementation(); User r = userImplementation.getUserWithPhone(phone); - String response = "{\"name\":\""+r.getName()+"\",\"firstname\":\""+r.getFirstname()+"\",\"user_hash\":\""+r.getUser_hash()+"\"}"; + String response = "{\"name\":\""+r.getName()+"\",\"firstname\":\""+r.getFirstname()+"\",\"user_hash\":\""+r.getUser_hash()+"\",\"approved\":\""+r.isApproved()+"\"}"; return ResponseEntity.status(HttpStatus.OK).body(response); }catch (Exception e){ String r = "{\"response\":\""+e.getMessage()+"\"}";