put work 100%
This commit is contained in:
parent
d9cfa03756
commit
320eebefa5
@ -38,6 +38,9 @@ public class UsersRessources {
|
||||
|
||||
///Function
|
||||
private Boolean checkUserCookie(String userCookie, UsersEntity users){
|
||||
if(userCookie == null){
|
||||
return false;
|
||||
}
|
||||
String name = new String(Base64.decode(userCookie), StandardCharsets.UTF_8);
|
||||
if(!name.equals(users.pseudo) && (!users.status)){
|
||||
return false;
|
||||
@ -113,10 +116,10 @@ public class UsersRessources {
|
||||
return Response.status(Response.Status.CONFLICT).build();
|
||||
}
|
||||
UsersEntity usersNew = new UsersEntity();
|
||||
usersNew.id = UUID.randomUUID();
|
||||
usersNew.name = users.name;
|
||||
usersNew.pseudo = users.pseudo;
|
||||
usersNew.firstName = users.firstName;
|
||||
usersNew.email = users.email;
|
||||
usersNew.birth = LocalDate.of(users.birth.getYear(), users.birth.getMonth(), users.birth.getDayOfMonth());
|
||||
usersNew.created_at = LocalDateTime.now();
|
||||
usersNew.updated_at = LocalDateTime.now();
|
||||
@ -129,6 +132,4 @@ public class UsersRessources {
|
||||
}
|
||||
return Response.status(Response.Status.NO_CONTENT).build();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user