up
This commit is contained in:
parent
3812808697
commit
58f866fef0
|
@ -130,7 +130,8 @@ public class UserResource {
|
|||
try {
|
||||
UserImplementation userImplementation = new UserImplementation();
|
||||
User r = userImplementation.getUserWithEmail(email);
|
||||
return ResponseEntity.status(HttpStatus.OK).body(r);
|
||||
String response = "{\"name\":\""+r.getName()+"\",\"firstname\":\""+r.getFirstname()+"\",\"user_hash\":\""+r.getUser_hash()+"\"}";
|
||||
return ResponseEntity.status(HttpStatus.OK).body(response);
|
||||
}catch (Exception e){
|
||||
String r = "{\"response\":\""+e.getMessage()+"\"}";
|
||||
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(r);
|
||||
|
@ -143,7 +144,8 @@ public class UserResource {
|
|||
try {
|
||||
UserImplementation userImplementation = new UserImplementation();
|
||||
User r = userImplementation.getUserWithPhone(phone);
|
||||
return ResponseEntity.status(HttpStatus.OK).body(r);
|
||||
String response = "{\"name\":\""+r.getName()+"\",\"firstname\":\""+r.getFirstname()+"\",\"user_hash\":\""+r.getUser_hash()+"\"}";
|
||||
return ResponseEntity.status(HttpStatus.OK).body(response);
|
||||
}catch (Exception e){
|
||||
String r = "{\"response\":\""+e.getMessage()+"\"}";
|
||||
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(r);
|
||||
|
@ -156,7 +158,8 @@ public class UserResource {
|
|||
try {
|
||||
UserImplementation userImplementation = new UserImplementation();
|
||||
User r = userImplementation.getUserWithMailAndPhone(email,phone);
|
||||
return ResponseEntity.status(HttpStatus.OK).body(r);
|
||||
String response = "{\"name\":\""+r.getName()+"\",\"firstname\":\""+r.getFirstname()+"\",\"user_hash\":\""+r.getUser_hash()+"\"}";
|
||||
return ResponseEntity.status(HttpStatus.OK).body(response);
|
||||
}catch (Exception e){
|
||||
String r = "{\"response\":\""+e.getMessage()+"\"}";
|
||||
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body(r);
|
||||
|
|
Loading…
Reference in a new issue