mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-11-28 14:34:18 +03:00
Extract function.
This commit is contained in:
parent
dd47359bee
commit
574f6711df
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user