From e5c198f8390b89dfda5f591bc0f05cf0394d62f3 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Thu, 5 Oct 2023 13:54:04 +0530 Subject: [PATCH] refactor: Remove redundant accounts/get (#8056) Co-authored-by: Muhsin Keloth --- .../dashboard/routes/dashboard/settings/account/Index.vue | 5 +---- .../dashboard/routes/dashboard/settings/billing/Index.vue | 2 -- .../routes/dashboard/settings/inbox/ChannelList.vue | 1 - 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/app/javascript/dashboard/routes/dashboard/settings/account/Index.vue b/app/javascript/dashboard/routes/dashboard/settings/account/Index.vue index 44b13c116..3357081b1 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/account/Index.vue +++ b/app/javascript/dashboard/routes/dashboard/settings/account/Index.vue @@ -220,14 +220,11 @@ export default { }, }, mounted() { - if (!this.id) { - this.initializeAccount(); - } + this.initializeAccount(); }, methods: { async initializeAccount() { try { - await this.$store.dispatch('accounts/get'); const { name, locale, diff --git a/app/javascript/dashboard/routes/dashboard/settings/billing/Index.vue b/app/javascript/dashboard/routes/dashboard/settings/billing/Index.vue index 7a9b7880b..863e1b5f9 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/billing/Index.vue +++ b/app/javascript/dashboard/routes/dashboard/settings/billing/Index.vue @@ -72,8 +72,6 @@ export default { }, methods: { async fetchAccountDetails() { - await this.$store.dispatch('accounts/get'); - if (!this.hasABillingPlan) { this.$store.dispatch('accounts/subscription'); } diff --git a/app/javascript/dashboard/routes/dashboard/settings/inbox/ChannelList.vue b/app/javascript/dashboard/routes/dashboard/settings/inbox/ChannelList.vue index 696c75457..a277a93b7 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/inbox/ChannelList.vue +++ b/app/javascript/dashboard/routes/dashboard/settings/inbox/ChannelList.vue @@ -70,7 +70,6 @@ export default { }, methods: { async initializeEnabledFeatures() { - await this.$store.dispatch('accounts/get', this.accountId); this.enabledFeatures = this.account.features; }, initChannelAuth(channel) {