Skip to content

Commit 064ed09

Browse files
committed
to fix oneoff set session logic
1 parent 6b29e44 commit 064ed09

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ ThisBuild / organization := "app.softnetwork"
3030

3131
name := "generic-persistence-api"
3232

33-
ThisBuild / version := "0.3.4"
33+
ThisBuild / version := "0.3.4.1"
3434

3535
ThisBuild / scalaVersion := "2.12.11"
3636

session/core/src/main/scala/com/softwaremill/session/OneOffTapirSession.scala

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,9 @@ private[session] trait OneOffTapirSession[T] {
5555
option: Option[T],
5656
existing: Option[String]
5757
): Either[ERROR_OUTPUT, Option[String]] =
58-
existing match {
59-
case None =>
60-
option match {
61-
case Some(v) => Right(Some(manager.clientSessionManager.encode(v)))
62-
case _ => Right(None)
63-
}
64-
case some => Right(some)
58+
option match {
59+
case Some(v) => Right(Some(manager.clientSessionManager.encode(v)))
60+
case _ => Right(existing)
6561
}
6662

6763
def setOneOffCookieSession[SECURITY_INPUT, ERROR_OUTPUT, SECURITY_OUTPUT](

0 commit comments

Comments
 (0)