ruby-roda/secure_app.rb
2025-08-04 19:07:10 +02:00

18 lines
346 B
Ruby

require 'roda'
require 'json'
class SecureApp < Roda
route do |r|
r.on "note" do
r.get String do |id|
response['Content-Type'] = 'application/json'
{ id: id, content: "This is a secure note #{id}" }.to_json
end
end
r.get "status" do
{ status: "You are authenticated" }.to_json
end
end
end