Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
niladic committed Oct 16, 2024
1 parent f26ffb0 commit 278671d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions app/models/dataModels.scala
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ object dataModels {
case class PasswordRow(
userId: UUID,
passwordHash: String,
creationDate: Instant,
lastUpdate: Instant,
)

Expand Down
4 changes: 2 additions & 2 deletions app/services/NotificationService.scala
Original file line number Diff line number Diff line change
Expand Up @@ -203,14 +203,14 @@ class NotificationService @Inject() (
val url = absoluteUrlPath + s"?token=${token}"
val name = userName.some.map(_.trim).filter(_.nonEmpty)
val expiration = expirationDate.atZone(userTimeZone)
val bodyInner = common.recoverPasswordBody(
val bodyInner = common.passwordReinitializationBody(
name,
userTimeZone,
url,
expiration
)
val email = Email(
subject = common.recoverPasswordSubject,
subject = common.passwordReinitializationSubject,
from = from,
replyTo = replyTo,
to = List(
Expand Down
1 change: 1 addition & 0 deletions app/services/PasswordService.scala
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class PasswordService @Inject() (
private val (passwordRow, passwordTableFields) = Macros.parserWithFields[PasswordRow](
"user_id",
"password_hash",
"creation_date",
"last_update",
)

Expand Down
4 changes: 2 additions & 2 deletions app/views/emails/common.scala
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ object common {
) ::: commonEmailFooter
}

val recoverPasswordSubject = "Réinitialisation du mot de passe Administration+"
val passwordReinitializationSubject = "Réinitialisation du mot de passe Administration+"

def recoverPasswordBody(
def passwordReinitializationBody(
userName: Option[String],
userTimeZone: ZoneId,
absoluteUrl: String,
Expand Down

0 comments on commit 278671d

Please sign in to comment.