Skip to content
Snippets Groups Projects
Commit 981a8547 authored by Mostafa Hadizadeh's avatar Mostafa Hadizadeh
Browse files

fix toast

parent 5188833e
No related branches found
No related tags found
1 merge request!1Development2 into main to clean the repo
......@@ -202,11 +202,12 @@ export default {
this.send_status = 'ready'
try {
this.toast.error("A user with this email already exists. Please login.")
const data = JSON.parse(response.data.message);
for (const key in data) {
this.errors.push(data[key][0].message);
}
this.toast.error("A user with this email already exists. Please login.")
} catch(e) {
// If response.data.message is not JSON, it's a string, so push it directly.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment