diff --git a/app/controllers/api/v1/accounts_controller.rb b/app/controllers/api/v1/accounts_controller.rb index 35f28d337..0bbf2f67f 100644 --- a/app/controllers/api/v1/accounts_controller.rb +++ b/app/controllers/api/v1/accounts_controller.rb @@ -11,7 +11,10 @@ class Api::V1::AccountsController < Api::BaseController with: :render_error_response def create - @user = AccountBuilder.new(account_params).perform + @user = AccountBuilder.new( + account_name: account_params[:account_name], + email: account_params[:email] + ).perform if @user send_auth_headers(@user) render json: { @@ -25,6 +28,6 @@ class Api::V1::AccountsController < Api::BaseController private def account_params - params.permit(:account_name, :email).to_h + params.permit(:account_name, :email) end end