mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
refactor(editor): Stricter linting for promises and async functions (no-changelog) (#4642)
This commit is contained in:
@@ -248,20 +248,20 @@ export default mixins(showMessage, nodeHelpers).extend({
|
||||
}
|
||||
}
|
||||
|
||||
this.$externalHooks().run('credentialsEdit.credentialModalOpened', {
|
||||
await this.$externalHooks().run('credentialsEdit.credentialModalOpened', {
|
||||
credentialType: this.credentialTypeName,
|
||||
isEditingCredential: this.mode === 'edit',
|
||||
activeNode: this.ndvStore.activeNode,
|
||||
});
|
||||
|
||||
setTimeout(() => {
|
||||
setTimeout(async () => {
|
||||
if (this.credentialId) {
|
||||
if (!this.requiredPropertiesFilled && this.credentialPermissions.isOwner === true) {
|
||||
// sharees can't see properties, so this check would always fail for them
|
||||
// if the credential contains required fields.
|
||||
this.showValidationWarning = true;
|
||||
} else {
|
||||
this.retestCredential();
|
||||
await this.retestCredential();
|
||||
}
|
||||
}
|
||||
}, 0);
|
||||
@@ -825,7 +825,7 @@ export default mixins(showMessage, nodeHelpers).extend({
|
||||
}
|
||||
|
||||
this.$telemetry.track('User saved credentials', trackProperties);
|
||||
this.$externalHooks().run('credentialEdit.saveCredential', trackProperties);
|
||||
await this.$externalHooks().run('credentialEdit.saveCredential', trackProperties);
|
||||
}
|
||||
|
||||
return credential;
|
||||
@@ -848,7 +848,7 @@ export default mixins(showMessage, nodeHelpers).extend({
|
||||
return null;
|
||||
}
|
||||
|
||||
this.$externalHooks().run('credential.saved', {
|
||||
await this.$externalHooks().run('credential.saved', {
|
||||
credential_type: credentialDetails.type,
|
||||
credential_id: credential.id,
|
||||
is_new: true,
|
||||
@@ -882,7 +882,7 @@ export default mixins(showMessage, nodeHelpers).extend({
|
||||
return null;
|
||||
}
|
||||
|
||||
this.$externalHooks().run('credential.saved', {
|
||||
await this.$externalHooks().run('credential.saved', {
|
||||
credential_type: credentialDetails.type,
|
||||
credential_id: credential.id,
|
||||
is_new: false,
|
||||
@@ -922,7 +922,7 @@ export default mixins(showMessage, nodeHelpers).extend({
|
||||
|
||||
try {
|
||||
this.isDeleting = true;
|
||||
this.credentialsStore.deleteCredential({ id: this.credentialId });
|
||||
await this.credentialsStore.deleteCredential({ id: this.credentialId });
|
||||
this.hasUnsavedChanges = false;
|
||||
} catch (error) {
|
||||
this.$showError(
|
||||
|
||||
Reference in New Issue
Block a user