Skip to content

Commit

Permalink
update example
Browse files Browse the repository at this point in the history
  • Loading branch information
jodersky committed Nov 2, 2024
1 parent 24e0f45 commit d7924cc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion example/decoratedContext/app/src/DecoratedContext.scala
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ object DecoratedContext extends cask.MainRoutes{
def wrapFunction(req: cask.Request, delegate: Delegate) = {
// Create a custom context out of the request. Custom contexts are useful
// to group an expensive operation that may be used by multiple
// parameter readers.
// parameter readers or that carry state. This example focuses on carrying
// state.
val ctx = Context(Session(collection.mutable.Map.empty)) // this would typically be populated from a signed cookie

delegate(ctx, Map("user" -> 1337)).map{ response =>
Expand Down

0 comments on commit d7924cc

Please sign in to comment.