public IHttpActionResult Addsource([FromBody] GeneralManagementViewModel model) { dataManager = new DataManager(); Source source = dataManager.AddSource(model.Name, model.Site); if (source != null) { return(Ok(source.SourceId)); } return(StatusCode(HttpStatusCode.NotAcceptable)); }
public async Task <IHttpActionResult> SendPublicNotificationAsync([FromBody] GeneralManagementViewModel model) { await new ControllerHelpers().SendPushNotificationAsync("/topics/general", model.NotificationMessageViewModel.Title, model.NotificationMessageViewModel.Message); return(Ok()); }