From 7dec658976b413e86b5c70f78a38f43fcadc41ad Mon Sep 17 00:00:00 2001 From: jodersky Date: Mon, 12 Aug 2024 09:25:56 +0000 Subject: [PATCH] deploy: 2945e1430a7c6323b21a8dfe001a90a356695d39 --- index.html | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/index.html b/index.html index 7a3bf51ca0..16a7742967 100644 --- a/index.html +++ b/index.html @@ -586,19 +586,19 @@ } class loggedIn extends cask.RawDecorator { def wrapFunction(ctx: cask.Request, delegate: Delegate) = { - delegate(ctx, Map("user" -> new User())) + delegate(Map("user" -> new User())) } } class withExtra extends cask.RawDecorator { def wrapFunction(ctx: cask.Request, delegate: Delegate) = { - delegate(ctx, Map("extra" -> 31337)) + delegate(Map("extra" -> 31337)) } } class withCustomHeader extends cask.RawDecorator { def wrapFunction(request: cask.Request, delegate: Delegate) = { request.headers.get("x-custom-header").map(_.head) match { - case Some(header) => delegate(request, Map("customHeader" -> header)) + case Some(header) => delegate(Map("customHeader" -> header)) case None => cask.router.Result.Success( cask.model.Response( @@ -679,12 +679,12 @@ } class loggedIn extends cask.RawDecorator { def wrapFunction(ctx: cask.Request, delegate: Delegate) = { - delegate(ctx, Map("user" -> new User())) + delegate(Map("user" -> new User())) } } class withExtra extends cask.RawDecorator { def wrapFunction(ctx: cask.Request, delegate: Delegate) = { - delegate(ctx, Map("extra" -> 31337)) + delegate(Map("extra" -> 31337)) } } @@ -720,7 +720,7 @@ class custom(val path: String, val methods: Seq[String]) extends cask.HttpEndpoint[Int, Seq[String]]{ def wrapFunction(ctx: cask.Request, delegate: Delegate) = { - delegate(ctx, Map()).map{num => + delegate(Map()).map{num => cask.Response("Echo " + num, statusCode = num) } } @@ -970,7 +970,7 @@ class transactional extends cask.RawDecorator{ def wrapFunction(pctx: cask.Request, delegate: Delegate) = { sqliteClient.transaction { txn => - val res = delegate(ctx, Map("txn" -> txn)) + val res = delegate(Map("txn" -> txn)) if (res.isInstanceOf[cask.router.Result.Error]) txn.rollback() res } @@ -1064,7 +1064,7 @@ class transactional extends cask.RawDecorator{ def wrapFunction(pctx: cask.Request, delegate: Delegate) = { sqliteClient.transaction { txn => - val res = delegate(ctx, Map("txn" -> txn)) + val res = delegate(Map("txn" -> txn)) if (res.isInstanceOf[cask.router.Result.Error]) txn.rollback() res }