Skip to content
Permalink
Browse files
update
  • Loading branch information
mahesh warang committed Apr 14, 2023
1 parent 94f14e9 commit 93ecd89e2696884540e51e3c13cc76f8075fc525
Showing 1 changed file with 4 additions and 4 deletions.
@@ -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";
}

0 comments on commit 93ecd89

Please sign in to comment.