redirect to correct dashboard after registration
This commit is contained in:
		
							parent
							
								
									fc98e4eb65
								
							
						
					
					
						commit
						b1803fbd27
					
				| @ -0,0 +1,4 @@ | ||||
| @page | ||||
| @model EnotaryoPH.Web.Pages.Notary.Dashboard.DashboardModel | ||||
| @{ | ||||
| } | ||||
| @ -0,0 +1,12 @@ | ||||
| using Microsoft.AspNetCore.Mvc; | ||||
| using Microsoft.AspNetCore.Mvc.RazorPages; | ||||
| 
 | ||||
| namespace EnotaryoPH.Web.Pages.Notary.Dashboard | ||||
| { | ||||
|     public class DashboardModel : PageModel | ||||
|     { | ||||
|         public void OnGet() | ||||
|         { | ||||
|         } | ||||
|     } | ||||
| } | ||||
| @ -74,7 +74,9 @@ namespace EnotaryoPH.Web.Pages | ||||
| 
 | ||||
|             _notaryoDBContext.SaveChanges(); | ||||
| 
 | ||||
|             return RedirectToPage("/Principal/Dashboard"); | ||||
|             return RoleType == "Principal" | ||||
|                 ? Redirect("/Principal/Dashboard/Dashboard") | ||||
|                 : Redirect("/Notary/Dashboard/Dashboard"); | ||||
|         } | ||||
| 
 | ||||
|         [BindProperty] | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user