mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-12-25 04:43:03 +03:00
Rename function.
This commit is contained in:
parent
12c0013ea3
commit
ac8f57b145
@ -54,7 +54,7 @@ data routeParams =
|
||||
|> Result.withDefault Nothing
|
||||
|> Maybe.withDefault Session.empty
|
||||
|> Session.insert "name" name
|
||||
|> Session.withFlash2 "message" ("Welcome " ++ name ++ "!")
|
||||
|> Session.withFlash "message" ("Welcome " ++ name ++ "!")
|
||||
, "/greet"
|
||||
|> Server.Response.temporaryRedirect
|
||||
)
|
||||
|
@ -1,8 +1,8 @@
|
||||
module Server.Session exposing (Decoder, NotLoadedReason(..), Session(..), Value(..), clearFlashCookies, empty, expectSession, flashPrefix, get, insert, remove, setValues, succeed, unwrap, update, withFlash2, withSession)
|
||||
module Server.Session exposing (Decoder, NotLoadedReason(..), Session(..), Value(..), clearFlashCookies, empty, expectSession, flashPrefix, get, insert, remove, setValues, succeed, unwrap, update, withFlash, withSession)
|
||||
|
||||
{-|
|
||||
|
||||
@docs Decoder, NotLoadedReason, Session, SessionUpdate, Value, clearFlashCookies, empty, expectSession, flash, flashPrefix, get, insert, noUpdates, oneUpdate, remove, setValues, succeed, unwrap, update, updateAllFields, withFlash, withFlash2, withSession
|
||||
@docs Decoder, NotLoadedReason, Session, SessionUpdate, Value, clearFlashCookies, empty, expectSession, flash, flashPrefix, get, insert, noUpdates, oneUpdate, remove, setValues, succeed, unwrap, update, updateAllFields, withFlash, withFlash, withSession
|
||||
|
||||
-}
|
||||
|
||||
@ -36,8 +36,8 @@ type Value
|
||||
|
||||
|
||||
{-| -}
|
||||
withFlash2 : String -> String -> Session -> Session
|
||||
withFlash2 key value (Session session) =
|
||||
withFlash : String -> String -> Session -> Session
|
||||
withFlash key value (Session session) =
|
||||
session
|
||||
|> Dict.insert key (NewFlash value)
|
||||
|> Session
|
||||
|
Loading…
Reference in New Issue
Block a user