Skip to content
This repository has been archived by the owner on Aug 25, 2018. It is now read-only.

Delete function? #5

Open
audoeyop opened this issue Nov 13, 2014 · 1 comment
Open

Delete function? #5

audoeyop opened this issue Nov 13, 2014 · 1 comment

Comments

@audoeyop
Copy link

Is there a function to DELETE of remove?

@fproldan
Copy link

Hi!, there is not function DELETE, but i added this code to tasty-resource.js.

   TastyResourceFactory.prototype.remove = function(id) {
      var promise, url,
        _this = this;
      url = this._get_detail_url(id);
      this._resolved = false;
      promise = this.$http.delete(url, this._get_data());
      promise.then(function() {
        return _this._resolved = true;
      });
      return promise;
    };

Hope this help you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants