示例#1
0
        public async Task <int> DeleteImage(int imageId, string url)
        {
            var cloudinaryResult = await _imageStorageService.DeleteImage(url);

            if (cloudinaryResult.StatusCode != HttpStatusCode.OK)
            {
                throw new Exception($"Can not upload listing image {url}: {cloudinaryResult.Error.Message}");
            }


            return(await _imageRepository.DeleteImage(imageId));
        }