Skip to content

Commit

Permalink
Fix: Import operation emailProvider and custom email provider action …
Browse files Browse the repository at this point in the history
…in the same execution (#1005)

Fix: Adjust order of processChanges to ensure that
actions are created before email provider is
updated
  • Loading branch information
kushalshit27 authored Dec 18, 2024
1 parent 4fc072b commit 998fba2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/tools/auth0/handlers/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ export default class ActionHandler extends DefaultAPIHandler {
}
}

@order('60')
@order('50')
async processChanges(assets: Assets) {
const { actions } = assets;

Expand Down
3 changes: 2 additions & 1 deletion src/tools/auth0/handlers/emailProvider.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { EmailProviderCreate } from 'auth0';
import { isEmpty } from 'lodash';
import DefaultHandler from './default';
import DefaultHandler, { order } from './default';
import { Asset, Assets } from '../../../types';

export const schema = { type: 'object' };
Expand Down Expand Up @@ -33,6 +33,7 @@ export default class EmailProviderHandler extends DefaultHandler {
return super.objString({ name: provider.name, enabled: provider.enabled });
}

@order('60')
async processChanges(assets: Assets): Promise<void> {
const { emailProvider } = assets;

Expand Down
2 changes: 1 addition & 1 deletion src/tools/auth0/handlers/emailTemplates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export default class EmailTemplateHandler extends DefaultHandler {
}

// Run after email provider changes
@order('60')
@order('70')
async processChanges(assets: Assets): Promise<void> {
const { emailTemplates } = assets;

Expand Down

0 comments on commit 998fba2

Please sign in to comment.