Ejemplo n.º 1
0
 public override void OnActionExecuting(ActionExecutingContext context)
 {
     if (context.HttpContext.User.Identity.IsAuthenticated)
     {
         _gebruiker = _gebruikerRepository.GetByEmail(context.HttpContext.User.Identity.Name);
     }
     context.ActionArguments["gebruiker"] = _gebruiker;
     base.OnActionExecuting(context);
 }
Ejemplo n.º 2
0
        public ActionResult <Gebruiker> GetGebruiker(string email)
        {
            Gebruiker gebruiker = _gebruikersRepository.GetByEmail(email);

            if (gebruiker == null)
            {
                return(NotFound());
            }

            return(gebruiker);
        }