|
|
@ -6,7 +6,8 @@ class AppSignUpService < BaseService |
|
|
|
|
|
|
|
|
|
|
|
user_params = params.slice(:email, :password, :agreement, :locale) |
|
|
|
user_params = params.slice(:email, :password, :agreement, :locale) |
|
|
|
account_params = params.slice(:username) |
|
|
|
account_params = params.slice(:username) |
|
|
|
user = User.create!(user_params.merge(created_by_application: app, password_confirmation: user_params[:password], account_attributes: account_params)) |
|
|
|
invite_request_params = { text: params[:reason] } |
|
|
|
|
|
|
|
user = User.create!(user_params.merge(created_by_application: app, password_confirmation: user_params[:password], account_attributes: account_params, invite_request_attributes: invite_request_params)) |
|
|
|
|
|
|
|
|
|
|
|
Doorkeeper::AccessToken.create!(application: app, |
|
|
|
Doorkeeper::AccessToken.create!(application: app, |
|
|
|
resource_owner_id: user.id, |
|
|
|
resource_owner_id: user.id, |
|
|
|