public BasicResponse DeleteFlag(FlagDeleteRequest flagrequest) { _Repository.DeleteFlag(flagrequest.Id); var flagresponse = new BasicResponse(); return(flagresponse); }
public async Task <int> UnFlagSnippet(Guid id) { var getSnippet = _snippetRepository.GetById(id); var flag = _flagRepository.GetAll().FirstOrDefault(f => f.ItemId == id); var snippet = await getSnippet; if (flag != null) { _flagRepository.DeleteFlag(flag.Id); snippet.Flags = _flagRepository.GetAll().Where(f => f.ItemId == flag.ItemId).Count(); snippet = await _snippetRepository.Update(snippet); } return(snippet.Flags); }
public void DeleteComment(int id, HttpRequestMessage request) { flagRepository.DeleteFlag(id); }