Skip to content

Commit

Permalink
update confirm_email method to PUT
Browse files Browse the repository at this point in the history
  • Loading branch information
matievisthekat committed Apr 25, 2022
1 parent 99a32a3 commit 5d2e1de
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/controllers/api/v1/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def me
render json: @user
end

# POST /users/confirm_email
# PUT /users/confirm_email
def confirm_email
confirm = ConfirmEmailKey.find_by(key: confirm_email_params[:key])
if confirm.nil?
Expand Down
3 changes: 1 addition & 2 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
resource :users do
get '/', to: 'users#index', on: :collection
get '/me', to: 'users#me', on: :collection
post '/confirm_email', to: 'users#confirm_email', on: :collection
post '/resend_confirm', to: 'users#resend_confirm', on: :collection
put '/confirm_email', to: 'users#confirm_email', on: :collection
post '/login', to: 'users#login', on: :collection
post '/register', to: 'users#register', on: :collection
delete '/logout', to: 'users#logout', on: :collection
Expand Down

0 comments on commit 5d2e1de

Please sign in to comment.