add column active mail

This commit is contained in:
Valentin CZERYBA 2022-05-26 22:52:32 +02:00
parent 3e45ad224d
commit e3dbd0b5d1
2 changed files with 3 additions and 1 deletions

View File

@ -39,6 +39,8 @@ public class UsersEntity extends PanacheEntityBase {
public LocalDate birth; public LocalDate birth;
@ColumnDefault("false") @ColumnDefault("false")
public Boolean status; public Boolean status;
@ColumnDefault("false")
public Boolean active_mail;
@Column(nullable = false) @Column(nullable = false)
public String password; public String password;
@Column(nullable = false) @Column(nullable = false)

View File

@ -150,6 +150,7 @@ public class UsersRessources {
.encryptSHA512(Base64.toBase64String(users.password.getBytes(StandardCharsets.UTF_8))); .encryptSHA512(Base64.toBase64String(users.password.getBytes(StandardCharsets.UTF_8)));
usersNew.roles = users.roles; usersNew.roles = users.roles;
usersNew.status = false; usersNew.status = false;
usersNew.active_mail = true;
usersNew.persist(); usersNew.persist();
if (usersNew.isPersistent()) { if (usersNew.isPersistent()) {
status = Response.Status.CREATED; status = Response.Status.CREATED;
@ -264,7 +265,6 @@ public class UsersRessources {
status = Response.Status.NOT_MODIFIED; status = Response.Status.NOT_MODIFIED;
} }
} }
return Response.status(status).build(); return Response.status(status).build();
} }
} }