Extract function.

This commit is contained in:
Dillon Kearns 2022-01-23 12:53:22 -08:00
parent dd47359bee
commit 574f6711df

View File

@ -198,7 +198,13 @@ withSession config userRequest toRequest =
in
decrypted
|> DataSource.andThen
(\sessionResult ->
(encodeSessionUpdate config toRequest userRequestData)
)
(Request.cookie config.name)
userRequest
encodeSessionUpdate config toRequest userRequestData sessionResult =
sessionResult
|> toRequest userRequestData
|> DataSource.andThen
@ -220,10 +226,6 @@ withSession config userRequest toRequest =
(setValues sessionUpdate)
)
)
)
)
(Request.cookie config.name)
userRequest
decryptCookie : { a | secrets : Secrets.Value (List String) } -> String -> DataSource Session