mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 02:18:26 +00:00
Streamline form and input field
This commit is contained in:
@ -31,10 +31,12 @@ object CalEventCheckRoutes {
|
||||
Timestamp.current[F].map { now =>
|
||||
CalEvent.parse(str) match {
|
||||
case Right(ev) =>
|
||||
val next = ev.nextElapse(now.toUtcDateTime).map(Timestamp.atUtc)
|
||||
val next = ev
|
||||
.nextElapses(now.toUtcDateTime, 2)
|
||||
.map(Timestamp.atUtc)
|
||||
CalEventCheckResult(true, "Valid.", ev.some, next)
|
||||
case Left(err) =>
|
||||
CalEventCheckResult(false, err, None, None)
|
||||
CalEventCheckResult(false, err, None, Nil)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user