summaryrefslogtreecommitdiff
path: root/cask/test/src/test/cask/Decorated.scala
blob: c6e048a31b123f7cc32a202f449f7114a81286f4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package test.cask
import cask.model.ParamContext


object Decorated extends cask.MainRoutes{
  class myDecorator extends cask.Routes.Decorator {
    def getRawParams(ctx: ParamContext) = Map("extra" -> 31337)
  }

  @myDecorator()
  @cask.get("/hello/:world")
  def hello(world: String)(extra: Int) = {
    world + extra
  }

  initialize()
}