Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
 public async Task <IHttpActionResult> SendPublicNotificationAsync([FromBody] GeneralManagementViewModel model)
 {
     await new ControllerHelpers().SendPushNotificationAsync("/topics/general", model.NotificationMessageViewModel.Title, model.NotificationMessageViewModel.Message);
     return(Ok());
 }