예제 #1
0
        public async Task <IActionResult> AddRemoteImage(string hash)
        {
            var remoteImage = _remoteImageRepository.Get()
                              .FirstOrDefault(x => x.SHA256Hash == hash);

            if (remoteImage == null)
            {
                return(BadRequest());
            }

            var image = await _imageRepository.AddRemote(remoteImage);

            return(Ok(image));
        }