From bd7aa201c2abe5fade855a2c16b0829e4ba43a2d Mon Sep 17 00:00:00 2001 From: Nat Lasseter Date: Fri, 4 Apr 2025 12:17:55 +0100 Subject: [bracket-api] return 404 if date doesn't exist --- cgi/user.cgi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'cgi/user.cgi') diff --git a/cgi/user.cgi b/cgi/user.cgi index 535e580..b0a5017 100755 --- a/cgi/user.cgi +++ b/cgi/user.cgi @@ -93,5 +93,6 @@ when /^\/stuff-i-want/ page("Stuff I Want") when /^\/bracket-api/ load "bracket-api.cgi" - $cgi.out("application/json") { $pdata } + sts = $pdata == "null" ? "NOT_FOUND" : "OK" + $cgi.out("type" => "application/json", "status" => sts) { $pdata } end -- cgit v1.2.3