From 4c72ff46250d130b088c80d063a53a1f37c917dd Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Sat, 16 Jan 2021 10:20:38 -0600 Subject: [PATCH] AdminAPI: change from confirmation_pending to is_confirmed --- src/api/__mocks__/login.js | 2 +- src/store/modules/users.js | 2 +- src/views/users/components/ModerationDropdown.vue | 4 ++-- src/views/users/components/MultipleUsersMenu.vue | 4 ++-- src/views/users/index.vue | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/api/__mocks__/login.js b/src/api/__mocks__/login.js index a980f88b..31591f7b 100644 --- a/src/api/__mocks__/login.js +++ b/src/api/__mocks__/login.js @@ -43,7 +43,7 @@ export function getUserInfo(token, authHost) { 'statuses_count': 0, 'cover_photo': '', 'hide_follows': false, - 'pleroma': { 'confirmation_pending': false, 'deactivated': false, 'tags': ['force_nsfw'], 'is_admin': true }, + 'pleroma': { 'is_confirmed': true, 'deactivated': false, 'tags': ['force_nsfw'], 'is_admin': true }, 'profile_image_url_original': '', 'created_at': 'Fri Mar 01 15:15:19 +0000 2019', 'fields': [], diff --git a/src/store/modules/users.js b/src/store/modules/users.js index 29b98fcf..a9477323 100644 --- a/src/store/modules/users.js +++ b/src/store/modules/users.js @@ -149,7 +149,7 @@ const users = { }, async ConfirmUsersEmail({ dispatch, getters }, { users, _userId, _statusId }) { const updatedUsers = users.map(user => { - return { ...user, confirmation_pending: false } + return { ...user, is_confirmed: true } }) const nicknames = users.map(user => user.nickname) const callApiFn = async() => await confirmUserEmail(nicknames, getters.authHost, getters.token) diff --git a/src/views/users/components/ModerationDropdown.vue b/src/views/users/components/ModerationDropdown.vue index d54efe43..64aa75f6 100644 --- a/src/views/users/components/ModerationDropdown.vue +++ b/src/views/users/components/ModerationDropdown.vue @@ -57,13 +57,13 @@ {{ $t('users.rejectAccount') }} {{ $t('users.confirmAccount') }} {{ $t('users.resendConfirmation') }} diff --git a/src/views/users/components/MultipleUsersMenu.vue b/src/views/users/components/MultipleUsersMenu.vue index bdf65006..8446bbb0 100644 --- a/src/views/users/components/MultipleUsersMenu.vue +++ b/src/views/users/components/MultipleUsersMenu.vue @@ -244,13 +244,13 @@ export default { applyAction(filtered, approveAccountFn) }, confirmAccounts: () => { - const filtered = this.selectedUsers.filter(user => this.isLocalUser(user) && user.confirmation_pending) + const filtered = this.selectedUsers.filter(user => this.isLocalUser(user) && !user.is_confirmed) const confirmAccountFn = async(users) => await this.$store.dispatch('ConfirmUsersEmail', { users }) applyAction(filtered, confirmAccountFn) }, resendConfirmation: () => { - const filtered = this.selectedUsers.filter(user => this.isLocalUser(user) && user.confirmation_pending) + const filtered = this.selectedUsers.filter(user => this.isLocalUser(user) && !user.is_confirmed) const resendConfirmationFn = async(users) => await this.$store.dispatch('ResendConfirmationEmail', users) applyAction(filtered, resendConfirmationFn) diff --git a/src/views/users/index.vue b/src/views/users/index.vue index 4baaed01..d20161b4 100644 --- a/src/views/users/index.vue +++ b/src/views/users/index.vue @@ -77,7 +77,7 @@ {{ isDesktop ? $t('users.moderator') : getFirstLetter($t('users.moderator')) }} - + {{ isDesktop ? $t('users.unconfirmed') : getFirstLetter($t('users.unconfirmed')) }}