From ec7603e6633b2bcdf9b8d29ce385f268f0059a56 Mon Sep 17 00:00:00 2001 From: lihaoyi Date: Wed, 10 Jul 2024 14:25:01 +0000 Subject: [PATCH] deploy: 080f2f3b57209931b1368144b22cdec7cea85586 --- index.html | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 79ae23b9b4..73e4858584 100644 --- a/index.html +++ b/index.html @@ -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" } @@ -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() }