From 652944146e31e2146b4dbd99057af50e39d67164 Mon Sep 17 00:00:00 2001 From: Theresa Treimer Date: Thu, 10 Jul 2025 22:47:21 +0200 Subject: [PATCH] fixed issues caused by untested PR #1 --- lapis/app.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lapis/app.lua b/lapis/app.lua index 4b0ce7f..a0251e8 100644 --- a/lapis/app.lua +++ b/lapis/app.lua @@ -19,7 +19,7 @@ app:get("/embed", function(self) if from == nil then return {"cups webring embed needs from defined (.../embed?from=me)"} end - return string.format('
', config.host, from, config.host, config.host, config.host, config.host, from, config.host), {layout = false, content_type="text/html"} + return string.format('
', config.host, from, config.host, config.host, config.host, config.host, from, config.host), {layout = false, content_type="text/html"} end) app:get("/random", function(self) @@ -39,6 +39,10 @@ app:get("/next", function(self) found = true end end + if "cups" == self.params.from then + rand = math.random(1,#members-1) + return {redirect_to=members[rand][2]} + end return {redirect_to="/"} end) @@ -55,6 +59,10 @@ app:get("/prev", function(self) found = true end end + if "cups" == self.params.from then + rand = math.random(1,#members-1) + return {redirect_to=members[rand][2]} + end return {redirect_to="/"} end)