Skip to content

Commit

Permalink
deploy: 080f2f3
Browse files Browse the repository at this point in the history
  • Loading branch information
lihaoyi committed Jul 10, 2024
1 parent 3aa116a commit ec7603e
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@
object QueryParams extends cask.MainRoutes{

@cask.get("/article/:articleId") // Mandatory query param, e.g. HOST/article/foo?param=bar
def getArticle(articleId: Int, param: String) = {
def getArticle(articleId: Int, param: String) = {
s"Article $articleId $param"
}

Expand Down Expand Up @@ -294,6 +294,21 @@
s"User $userName " + params.value
}

@cask.get("/statics/foo")
def getStatic() = {
"static route takes precedence"
}

@cask.get("/statics/:foo")
def getDynamics(foo: String) = {
s"dynamic route $foo"
}

@cask.get("/statics/bar")
def getStatic2() = {
"another static route"
}

initialize()
}

Expand Down

0 comments on commit ec7603e

Please sign in to comment.