コード例 #1
0
        public BasicResponse DeleteFlag(FlagDeleteRequest flagrequest)
        {
            _Repository.DeleteFlag(flagrequest.Id);
            var flagresponse = new BasicResponse();

            return(flagresponse);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
 public void DeleteComment(int id, HttpRequestMessage request)
 {
     flagRepository.DeleteFlag(id);
 }