summaryrefslogtreecommitdiff
path: root/app/controllers/api/user_accounts_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/api/user_accounts_controller.rb')
-rw-r--r--app/controllers/api/user_accounts_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/api/user_accounts_controller.rb b/app/controllers/api/user_accounts_controller.rb
index 85323df..600e168 100644
--- a/app/controllers/api/user_accounts_controller.rb
+++ b/app/controllers/api/user_accounts_controller.rb
@@ -10,7 +10,7 @@ module Api
end
def create
- @user_account = UserAccount.new(permitted_params)
+ @user_account = UserAccount.new(permitted_params.merge(role: 'regular'))
render json: generate_token, status: :ok and return if @user_account.save
@@ -25,7 +25,7 @@ module Api
end
def permitted_params
- params.require(:user_account).permit(:role, :email, :first_name, :last_name, :password)
+ params.permit(:email, :first_name, :last_name, :password)
end
end
end