Пример #1
0
        public async Task <IActionResult> CreateNewImageInfo([FromBody] ImageInfoInputModel body)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest("Model is not properly formatted."));
            }
            string lowresUrl = _imageService.GetLowresImgUrlWithAd(body);
            var    entity    = await _imageService.AddImageInfo(body, lowresUrl, this.HttpContext);

            return(CreatedAtRoute("GetImageInfoById", new { id = entity.ID }, null));
        }