<commit_before>function Artwork($http) {

  this.getArtworks = function() {
    return $http.get('http://localhost:3000/artworks')
  }
  
  this.getArtwork = function(id) {
    return $http.get('http://localhost:3000/artworks/' + id + '.json')
  }
}

angular
  .module('app')
  .service('Artwork', Artwork)
<commit_msg>add destroyArtwork function to Artwork service<commit_after>function Artwork($http) {

  this.getArtworks = function() {
    return $http.get('http://localhost:3000/artworks')
  }

  this.getArtwork = function(id) {
    return $http.get('http://localhost:3000/artworks/' + id + '.json')
  }

  this.destroyArtwork = function(id) {
    return $http.delete('http://localhost:3000/artworks/' + id))
  }
}

angular
  .module('app')
  .service('Artwork', Artwork)

{'fraction_non_alphanumeric': 0.17737789203084833, 'fraction_numerical': 0.02570694087403599, 'mean_word_length': 3.930379746835443, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5893716', 'n_tokens_mistral': 284, 'n_tokens_neox': 264, 'n_words': 42}