Skip to content

Commit 173afe2

Browse files
committed
fixes
1 parent 6961238 commit 173afe2

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

client/src/pages/Signin.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,16 +93,16 @@ const [Signininput, useSignininput] = useState<Signininput>({
9393
navigate("/");
9494
}, 300);
9595
} else {
96-
toast.error(res.data.msg, {
96+
toast.error(res.data.msg[0], {
9797
position: "top-right",
9898
theme: "dark",
9999
autoClose: 2000,
100100
});
101-
console.log(res.data.msg);
101+
console.log(res.data.msg[0]);
102102
}
103103
} catch (error: any) {
104-
console.log(error);
105-
toast.error(error.response.data.msg[0], {
104+
console.log(error.response.data.msg);
105+
toast.error(error.response.data.msg, {
106106
position: "top-right",
107107
theme: "dark",
108108
autoClose: 2000,

server/src/routes/user.route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ router.post('/signup',async(req,res)=>{
9292
},
9393
});
9494
if (!existuser) {
95-
return res.status(400).json({ msg: "user not exist" });
95+
return res.status(400).json({ msg: "Invalid Credentials" });
9696
}
9797

9898
const user = await prisma.user.findUnique({

0 commit comments

Comments
 (0)