Proba naprawienia
Signed-off-by: Marcin Woźniak <y0rune@aol.com>
This commit is contained in:
parent
cfc1e3eba7
commit
1682448627
@ -79,12 +79,18 @@ public class UserService {
|
|||||||
*/
|
*/
|
||||||
public User login(User authority) throws UserNotFoundException {
|
public User login(User authority) throws UserNotFoundException {
|
||||||
final String token = UUID.randomUUID().toString();
|
final String token = UUID.randomUUID().toString();
|
||||||
|
System.out.println(token);
|
||||||
if ((authority.getName() == null || authority.getSurname() == null) && authority.getUsosId() != null) {
|
if ((authority.getName() == null || authority.getSurname() == null) && authority.getUsosId() != null) {
|
||||||
final UserApiResponse resp = this.service.getUserData(authority.getUsosId());
|
final UserApiResponse resp = this.service.getUserData(authority.getUsosId());
|
||||||
authority.updateWithUsosData(resp);
|
authority.updateWithUsosData(resp);
|
||||||
|
System.out.println("PRAWIE WYCHODZE Z IFA");
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
System.out.println("TRY!!!!");
|
||||||
authority.setToken(token);
|
authority.setToken(token);
|
||||||
|
System.out.println(authority.getToken());
|
||||||
|
System.out.println(authority.getName());
|
||||||
|
System.out.println(authority.getSurname());
|
||||||
this.repo.save(authority);
|
this.repo.save(authority);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new UserNotFoundException(e.getMessage());
|
throw new UserNotFoundException(e.getMessage());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user