Esempio n. 1
0
        public StatusUpdateViewModel Post([FromBody] StatusUpdateViewModel model)
        {
            if (model == null)
            {
                return(null);
            }

            var appSettings = AppSettings();

            LightSpeedRepository repository = new LightSpeedRepository(appSettings);

            model.Author = UserContext.CurrentUserFullName;
            var updatedStatus = repository.CreateStatusUpdate(model);


            var pageContents = _pageService.GetById(model.PageId);

            SendUpdate(repository, updatedStatus, model.PageId, model.PageId, pageContents.Title, _projectStatusUpdateEmail);
            return(updatedStatus);
        }