From 0741bfc94b088fab0e4347c687da3e788af88312 Mon Sep 17 00:00:00 2001 From: Chris Snyder Date: Tue, 19 Mar 2013 13:53:27 -0500 Subject: [PATCH] Favorites - Use current Api instance. --- models/favorite.js | 2 +- src/models/favorite.coffee | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/models/favorite.js b/models/favorite.js index 8ac5486..e88fca2 100644 --- a/models/favorite.js +++ b/models/favorite.js @@ -55,7 +55,7 @@ Favorite.prototype.send = function() { var _this = this; this.trigger('sending'); - return Api.post("/projects/" + Api.current.project + "/favorites", this.toJSON(), function(response) { + return Api.current.post("/projects/" + Api.current.project + "/favorites", this.toJSON(), function(response) { return _this.id = response.id; }); }; diff --git a/src/models/favorite.coffee b/src/models/favorite.coffee index 275f680..c6aeaf6 100644 --- a/src/models/favorite.coffee +++ b/src/models/favorite.coffee @@ -17,7 +17,7 @@ class Favorite extends Recent send: -> @trigger 'sending' - Api.post "/projects/#{Api.current.project}/favorites", @toJSON(), (response) => + Api.current.post "/projects/#{Api.current.project}/favorites", @toJSON(), (response) => @id = response.id delete: ->