Example #1
0
        public async Task <DeleteFavoriteResponse> DeleteFavoriteAsync(DeleteFavoriteRequest request, DeleteFavoriteResponse response)
        {
            try
            {
                var isSuccess = await _weatherRepository.DeleteFromFavorites(request.CityKey).ConfigureAwait(false);

                if (isSuccess)
                {
                    response.Success("DeleteFavoriteAsync");
                }
            }
            catch (Exception ex) { response.Failed(ex); }
            return(response);
        }