Skip to content

Commit 9044856

Browse files
author
Ashish kumar Rudra
committed
Merge pull request #21 from gurus/puts-posts
Make the puts also support post
2 parents 2986ee7 + 522d20b commit 9044856

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/api/v1/gurus.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class Gurus < Grape::API
4848
end
4949
end
5050

51-
put "/:username" do
51+
self.route [:put, :post], "/:username" do
5252
declared_params = declared(params)[:guru]
5353
guru_params = declared_params.inject({}) do |result, (k, v)|
5454
result[k.to_s.underscore.to_sym] = v
@@ -90,7 +90,7 @@ class Gurus < Grape::API
9090
end
9191
end
9292

93-
put "/:username/deals/:dealUuid" do
93+
self.route [:put, :post], "/:username/deals/:dealUuid" do
9494
declared_params = declared(params)[:deal]
9595
deal_params = declared_params.inject({}) do |result, (k, v)|
9696
result[k.to_s.underscore.to_sym] = v

0 commit comments

Comments
 (0)