Skip to content

Commit

Permalink
deploy: 927c024
Browse files Browse the repository at this point in the history
  • Loading branch information
jodersky committed Jul 8, 2024
1 parent 37352f3 commit 709bfd8
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 709bfd8

Please sign in to comment.