Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
mahesh warang committed Apr 14, 2023
1 parent 94f14e9 commit 93ecd89
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,11 @@ public String login(){
@RequestMapping(value = "/admin/login",method = RequestMethod.POST )
public String login(@RequestParam("email")String username,@RequestParam("password")String pwd){

// User admin = credential.login(username);
User admin = credential.login(username);

// if(admin != null && Objects.equals(admin.getPwd(), pwd) && admin.getRole() == Roles.ADMIN){
// return "redirect:/admin/panel";
// }
if(admin != null && Objects.equals(admin.getPwd(), pwd) && admin.getRole() == Roles.ADMIN){
return "redirect:/admin/panel";
}
return "redirect:/admin/panel";
}

Expand Down

0 comments on commit 93ecd89

Please sign in to comment.