update api
This commit is contained in:
parent
d130dd9b2e
commit
0eed15427a
|
@ -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{
|
||||
|
|
|
@ -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()+"\"}";
|
||||
|
|
Loading…
Reference in a new issue