Commit f5203aae55b5b3e56214b2fcf6e70f64f64fe019

Authored by Leandro Santos
Committed by Rodrigo Souto
1 parent 39e535a0

define register as a post endpoint

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
lib/api/session.rb
@@ -31,7 +31,7 @@ module API @@ -31,7 +31,7 @@ module API
31 requires :login, type: String, desc: _("Login") 31 requires :login, type: String, desc: _("Login")
32 requires :password, type: String, desc: _("Password") 32 requires :password, type: String, desc: _("Password")
33 end 33 end
34 - get "/register" do 34 + post "/register" do
35 unique_attributes! User, [:email, :login] 35 unique_attributes! User, [:email, :login]
36 attrs = attributes_for_keys [:email, :login, :password] 36 attrs = attributes_for_keys [:email, :login, :password]
37 attrs[:password_confirmation] = attrs[:password] 37 attrs[:password_confirmation] = attrs[:password]