Esempio n. 1
0
        public async Task <Response <string> > DeleteFeed(string id)
        {
            var response = new Response <string>();
            var feed     = await RetrieveFeedById(id);

            if (feed is null)
            {
                response.Message = "Invalid feed id provided";
                return(response);
            }

            if (await _feedRepo.DeleteById(id))
            {
                response.Success = true;
                response.Message = "feed deleted successfully";
                return(response);
            }

            response.Message = "could not delete feed";
            return(response);
        }