feat: API changes to support multi step user signup (#8933)
-API Changes to support the new onboarding flow Co-authored-by: Sojan <sojan@pepalo.com>
This commit is contained in:
committed by
GitHub
parent
7320957405
commit
721a2f5052
@@ -22,6 +22,7 @@ class Api::V2::AccountsController < Api::BaseController
|
||||
).perform
|
||||
|
||||
fetch_account_and_user_info
|
||||
update_account_info if @account.present?
|
||||
|
||||
if @user
|
||||
send_auth_headers(@user)
|
||||
@@ -33,6 +34,18 @@ class Api::V2::AccountsController < Api::BaseController
|
||||
|
||||
private
|
||||
|
||||
def account_attributes
|
||||
{
|
||||
custom_attributes: @account.custom_attributes.merge({ 'onboarding_step' => 'profile_update' })
|
||||
}
|
||||
end
|
||||
|
||||
def update_account_info
|
||||
@account.update!(
|
||||
account_attributes
|
||||
)
|
||||
end
|
||||
|
||||
def fetch_account_and_user_info; end
|
||||
|
||||
def fetch_account
|
||||
|
||||
Reference in New Issue
Block a user