mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-19 05:58:34 +02:00
Some fixes
This commit is contained in:
@@ -42,8 +42,9 @@ _axios.interceptors.response.use(
|
||||
!error.config.ignoreErrors
|
||||
) {
|
||||
const busStore = useBusStore()
|
||||
const msg = error.response.data?.error || error.response.data
|
||||
busStore.displayNotification({
|
||||
msg: error.response.data,
|
||||
msg,
|
||||
type: 'error',
|
||||
})
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<script setup lang="js">
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import { useGettext } from 'vue3-gettext'
|
||||
import accountApi from '@/api/account'
|
||||
@@ -40,15 +40,17 @@ const busStore = useBusStore()
|
||||
const form = ref({})
|
||||
const loading = ref(false)
|
||||
|
||||
function submit() {
|
||||
async function submit() {
|
||||
loading.value = true
|
||||
accountApi.setForward(form.value).then(() => {
|
||||
loading.value = false
|
||||
try {
|
||||
await accountApi.setForward(form.value)
|
||||
busStore.displayNotification({
|
||||
type: 'success',
|
||||
msg: $gettext('Forward updated'),
|
||||
})
|
||||
})
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
accountApi.getForward().then((resp) => {
|
||||
|
||||
Reference in New Issue
Block a user