init
This commit is contained in:
commit
793560c0c4
7 changed files with 97 additions and 0 deletions
18
secure_app.rb
Normal file
18
secure_app.rb
Normal file
|
@ -0,0 +1,18 @@
|
|||
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
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue