Skip to content
Snippets Groups Projects
Unverified Commit 43c61bca authored by Eugen Rochko's avatar Eugen Rochko Committed by GitHub
Browse files

Add locale param to sign-up API (#9747)

Fix #9627
parent 0a4caa89
No related branches found
No related tags found
No related merge requests found
......@@ -76,7 +76,7 @@ class Api::V1::AccountsController < Api::BaseController
end
def account_params
params.permit(:username, :email, :password, :agreement)
params.permit(:username, :email, :password, :agreement, :locale)
end
def check_enabled_registrations
......
......@@ -4,7 +4,7 @@ class AppSignUpService < BaseService
def call(app, params)
return unless allowed_registrations?
user_params = params.slice(:email, :password, :agreement)
user_params = params.slice(:email, :password, :agreement, :locale)
account_params = params.slice(:username)
user = User.create!(user_params.merge(created_by_application: app, password_confirmation: user_params[:password], account_attributes: account_params))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment