diff --git a/src/main/java/com/covas/Resources/MailRessource.java b/src/main/java/com/covas/Resources/MailRessource.java index c006301..66731fc 100644 --- a/src/main/java/com/covas/Resources/MailRessource.java +++ b/src/main/java/com/covas/Resources/MailRessource.java @@ -16,7 +16,6 @@ import com.covas.Entity.UsersEntity; import io.quarkus.mailer.MailTemplate; import io.quarkus.redis.client.RedisClient; -import org.jboss.logging.Logger; @Path("mail") public class MailRessource { @@ -35,6 +34,7 @@ public class MailRessource { } String randomKey=UUID.randomUUID().toString(); redisClient.set(Arrays.asList(users.id.toString(),randomKey)); + redisClient.expire(users.id.toString(), "300"); mailer.to(users.email).subject(String.format("Compte %s créée", users.email)).data("name", users.pseudo).data("id",users.id).data("key",randomKey).send().subscribeAsCompletionStage(); return Response.ok().build(); }