public IActionResult Post([FromBody] PushNotificationModel model, [FromHeader] string Email) { _logger.LogDebug("Post Called"); var iden = this.User.Identity; var email = this.User.Claims.FirstOrDefault(p => p.Type == "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier")?.Value; //TODO: Implement Realistic Implementation model.Email = Email; var payload = JsonConvert.SerializeObject( new { Email = Email, Message = "Welcome", Link = "null" } ); Debug.WriteLine(payload); NofityUser(model.Endpoint, model.Keys.P256dh, model.Keys.Auth, payload); return(Created("", null)); }
public IActionResult JustforUsers([FromBody] PushNotificationModel model, [FromHeader] string Email) { return(Content("Ok")); }