Ejemplo n.º 1
0
        public async Task <Unit> Handle(RemovePhotoCommand request, CancellationToken cancellationToken)
        {
            var photoFromRepo = await GetPhotoAsync(request.PhotoId, request.LoggedUserId);

            await _cloudinarySerivce.RemoveAsync(request.PhotoId);

            var result = await RemoveFromDatabaseAsync(photoFromRepo);

            return(result);
        }