mirror of
https://github.com/astuto/astuto.git
synced 2025-12-16 03:37:56 +01:00
Add some welcome entities on tenant signup (#266)
This commit is contained in:
committed by
GitHub
parent
d80f63f27f
commit
30b7b0f5f4
@@ -40,14 +40,14 @@ class OAuthsController < ApplicationController
|
||||
Current.tenant = Tenant.find_by(subdomain: tenant_domain)
|
||||
end
|
||||
|
||||
user_profile = OAuthExchangeAuthCodeForProfile.new(
|
||||
user_profile = OAuthExchangeAuthCodeForProfileWorkflow.new(
|
||||
authorization_code: params[:code],
|
||||
o_auth: @o_auth
|
||||
).run
|
||||
|
||||
if reason == 'login'
|
||||
|
||||
user = OAuthSignInUser.new(
|
||||
user = OAuthSignInUserWorkflow.new(
|
||||
user_profile: user_profile,
|
||||
o_auth: @o_auth
|
||||
).run
|
||||
|
||||
@@ -45,6 +45,8 @@ class TenantsController < ApplicationController
|
||||
|
||||
@user.save!
|
||||
|
||||
CreateWelcomeEntitiesWorkflow.new().run
|
||||
|
||||
render json: @tenant, status: :created
|
||||
|
||||
rescue ActiveRecord::RecordInvalid => exception
|
||||
|
||||
Reference in New Issue
Block a user