diff --git a/src/store/index.js b/src/store/index.js index 1714b9250..57af9732e 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -25,7 +25,6 @@ import Vue, { set } from 'vue' import Vuex, { Store } from 'vuex' import sidebar from './modules/sidebar.js' import files from './modules/files.js' -import error from './modules/errors.js' import settings from './modules/settings.js' Vue.use(Vuex) @@ -80,6 +79,5 @@ export default new Store({ settings, sidebar, files, - error, }, }) diff --git a/src/views/SignPDF/_partials/ModalEmailManager.vue b/src/views/SignPDF/_partials/ModalEmailManager.vue index b4f8eb232..cd8b6302c 100644 --- a/src/views/SignPDF/_partials/ModalEmailManager.vue +++ b/src/views/SignPDF/_partials/ModalEmailManager.vue @@ -64,12 +64,11 @@ import NcDialog from '@nextcloud/vue/dist/Components/NcDialog.js' import NcTextField from '@nextcloud/vue/dist/Components/NcTextField.js' import NcButton from '@nextcloud/vue/dist/Components/NcButton.js' import NcLoadingIcon from '@nextcloud/vue/dist/Components/NcLoadingIcon.js' -import { showSuccess } from '@nextcloud/dialogs' +import { showError, showSuccess } from '@nextcloud/dialogs' import { loadState } from '@nextcloud/initial-state' import FormTextboxPasswordIcon from 'vue-material-design-icons/FormTextboxPassword.vue' import EmailIcon from 'vue-material-design-icons/Email.vue' import md5 from 'blueimp-md5' -import { onError } from '../../../helpers/errors.js' import { validateEmail } from '../../../utils/validators.js' import { useSignMethodsStore } from '../../../store/signMethods.js' import { useSignStore } from '../../../store/sign.js' @@ -171,7 +170,7 @@ export default { } this.signMethodsStore.hasEmailConfirmCode(true) } catch (err) { - onError(err) + showError(err.response.data.ocs.data.message) } finally { this.loading = false } diff --git a/src/views/SignPDF/_partials/ModalSMSManager.vue b/src/views/SignPDF/_partials/ModalSMSManager.vue index fd1dc6e7d..7be4f5d72 100644 --- a/src/views/SignPDF/_partials/ModalSMSManager.vue +++ b/src/views/SignPDF/_partials/ModalSMSManager.vue @@ -53,7 +53,6 @@ import axios from '@nextcloud/axios' import { generateOcsUrl } from '@nextcloud/router' import { confirmPassword } from '@nextcloud/password-confirmation' import { showError, showSuccess } from '@nextcloud/dialogs' -import { onError } from '../../../helpers/errors.js' import { settingsService } from '../../../domains/settings/index.js' import { useSignStore } from '../../../store/sign.js' @@ -106,7 +105,7 @@ export default { } showSuccess(t('libresign', 'Phone stored.')) } catch (err) { - onError(err) + showError(err.response.data.ocs.data.message) } finally { this.loading = false } @@ -132,7 +131,7 @@ export default { } this.tokenRequested = true } catch (err) { - onError(err) + showError(err.response.data.ocs.data.message) } finally { this.loading = false }