Exemple #1
0
        public async Task <ActionResult> AddReport(EventReportModel model)
        {
            var uid = new Guid(HttpContext.Request.Headers[AuthorizationHeaders.PersonUid].First());
            var validationResult = _eventValidation.ValidateAddReport(model);

            if (!validationResult.ValidationResult)
            {
                return(BadRequest(validationResult.ValidationMessage));
            }
            await _eventLogic.AddReport(model, uid);

            return(Ok(Messages.GetMessageJson(MessageTitles.ReportAdded, CultureParser.GetCultureFromHttpContext(HttpContext))));
        }