public virtual IActionResult CreateNotification([FromBody] CreateNotificationEvent model) { var adminId = HttpContext.User.Claims.FirstOrDefault(claim => claim.Type == Constants.UserIdClaimKey); var notification = model.Process(_context, adminId.Value); return(ResponseShell.Ok(notification)); }
public static CreateNotificationRequest Make(CreateNotificationEvent message) { return(new CreateNotificationRequest ( message.NotificationType, message.TemplateType, message.TemplateVersion, message.Receiver, message.TemplateMapper )); }
public virtual IActionResult UpdateNotification([FromRoute] long id, [FromBody] CreateNotificationEvent model) { var notification = model.UpdateProcess(_context, id); return(ResponseShell.Ok(notification)); }