Add /status/:code
Some checks failed
Gitea Actions Demo / test (push) Blocked by required conditions
Gitea Actions Demo / release-image (push) Blocked by required conditions
Gitea Actions Demo / lint (push) Has been cancelled

This commit is contained in:
Ryan Cavicchioni 2024-08-11 16:43:23 -05:00
parent 72f083c444
commit eaf642ca49
Signed by: ryanc
GPG Key ID: 877EEDAF9245103D

7
app.rb
View File

@ -2,6 +2,7 @@ require "bundler/setup"
require "sinatra"
require "sinatra/json"
require "sinatra/cookies"
require "sinatra/multi_route"
require "time"
require "fileutils"
require "json"
@ -355,3 +356,9 @@ get "/_cat/cookies" do
end
end
end
route :delete, :get, :patch, :post, :put, "/status/:code" do
# hello
code = Integer(params[:code])
status code if code.between? 100, 599
end