Skip to content

Commit

Permalink
Merge pull request #58 from Shu12388y/main
Browse files Browse the repository at this point in the history
resolve the login error
  • Loading branch information
Shu12388y authored Oct 12, 2024
2 parents aa0aefb + bf7ebdf commit ded5cf5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/app/login/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@ function Page() {
async function userLogin() {
try {
const userData = await axios.post("/api/user/login", { email, password });
toast.success("Login Successful");
Router.push("/profile");
console.log(userData.status)
if(userData.status == 200){
toast.success("Login Successful");
Router.push("/profile");
}

} catch (error:any) {
if (error.response && error.response.status === 404 || error.response && error.response.status === 400) {
Expand Down

0 comments on commit ded5cf5

Please sign in to comment.