Skip to content

Commit

Permalink
Fix errors display
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-vinz committed May 1, 2023
1 parent d3922a6 commit 62d0b20
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
8 changes: 7 additions & 1 deletion frontend/src/views/Conversations-create.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const submit = async () => {
});
});
} catch (error) {
errors.value = error.response.data;
errors.value = error.response.data.error;
}
};
Expand All @@ -50,6 +50,12 @@ onMounted(() => {
</script>

<template>
<div class="q-mx-lg">
<q-banner v-if="errors" dense inline-actions class="text-white bg-red">
{{ errors }}
</q-banner>
</div>

<main>
<div class="q-mx-auto" style="max-width: 50%">
<h3>New Conversation</h3>
Expand Down
8 changes: 6 additions & 2 deletions frontend/src/views/LoginView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,18 @@ const submit = async () => {
);
},
(error) => {
errors.value = error.response.data;
errors.value = error.response.data.error;
}
);
};
</script>

<template>
{{ errors }}
<div class="q-mx-lg">
<q-banner v-if="errors" dense inline-actions class="text-white bg-red">
{{ errors }}
</q-banner>
</div>

<main>
<div class="q-mx-auto q-mt-xl" style="max-width: 50%">
Expand Down

0 comments on commit 62d0b20

Please sign in to comment.