We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5d13976 commit fc454c8Copy full SHA for fc454c8
app.rb
@@ -59,6 +59,14 @@ class SpacexAPI < Sinatra::Base
59
# redirect request.url.sub('http', 'https') unless request.secure?
60
# end
61
62
+# Single endpoint outside namespace
63
+get '/' do
64
+ content_type :json
65
+ collection = client[:home]
66
+ hash = collection.find({}, projection: {_id: 0})
67
+ JSON.pretty_generate(hash.to_a[0])
68
+end
69
+
70
# Sets namespace for all following URL's
71
namespace '/v1' do
72
0 commit comments