From e3dbd0b5d18b94c60224952dbb0e1a2fa5217eb9 Mon Sep 17 00:00:00 2001 From: Valentin CZERYBA Date: Thu, 26 May 2022 22:52:32 +0200 Subject: [PATCH] add column active mail --- src/main/java/com/covas/Entity/UsersEntity.java | 2 ++ src/main/java/com/covas/Resources/UsersRessources.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/covas/Entity/UsersEntity.java b/src/main/java/com/covas/Entity/UsersEntity.java index 8d08a75..ce8979f 100644 --- a/src/main/java/com/covas/Entity/UsersEntity.java +++ b/src/main/java/com/covas/Entity/UsersEntity.java @@ -39,6 +39,8 @@ public class UsersEntity extends PanacheEntityBase { public LocalDate birth; @ColumnDefault("false") public Boolean status; + @ColumnDefault("false") + public Boolean active_mail; @Column(nullable = false) public String password; @Column(nullable = false) diff --git a/src/main/java/com/covas/Resources/UsersRessources.java b/src/main/java/com/covas/Resources/UsersRessources.java index 68479f1..a857ef2 100644 --- a/src/main/java/com/covas/Resources/UsersRessources.java +++ b/src/main/java/com/covas/Resources/UsersRessources.java @@ -150,6 +150,7 @@ public class UsersRessources { .encryptSHA512(Base64.toBase64String(users.password.getBytes(StandardCharsets.UTF_8))); usersNew.roles = users.roles; usersNew.status = false; + usersNew.active_mail = true; usersNew.persist(); if (usersNew.isPersistent()) { status = Response.Status.CREATED; @@ -264,7 +265,6 @@ public class UsersRessources { status = Response.Status.NOT_MODIFIED; } } - return Response.status(status).build(); } }