Some fixes

This commit is contained in:
Antoine Nguyen
2025-09-26 15:33:50 +02:00
parent dfe741698d
commit e576c71232
4 changed files with 20 additions and 16 deletions
+2 -1
View File
@@ -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) => {