Ejemplo n.º 1
0
        public async Task <ActionResult> RemoveEventImage(RemoveEventImageModel request)
        {
            var uid = new Guid(HttpContext.Request.Headers[AuthorizationHeaders.PersonUid].First());
            var validationResult = _eventValidation.ValidateRemoveEventImage(uid, request);

            if (!validationResult.ValidationResult)
            {
                return(BadRequest(validationResult.ValidationMessage));
            }
            await _eventLogic.RemoveEventImage(request);

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