Skip to content

How to get the flash messages inside a controller action? #616

Answered by s0kil
s0kil asked this question in Q&A
Discussion options

You must be logged in to vote
flashMessages :: [FlashMessage] <- fromContext
let flashMessagesText =
      map flashMessageText flashMessages
      where
        flashMessageText fm =
          case fm of
            SuccessFlashMessage message ->
              "Success: " ++ message
            ErrorFlashMessage message ->
              "Got an Error: " ++ message

Replies: 1 comment

Comment options

s0kil
Dec 21, 2020
Collaborator Author

You must be logged in to vote
0 replies
Answer selected by s0kil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant