Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

more bug fixes

  • Loading branch information...
commit 23eaf88df0f0730c945ba09877612c7d945ce2cd 1 parent e0c06d7
@nov authored
View
3  lib/smartfm/models/list.rb
@@ -72,7 +72,8 @@ def sentences(params = {})
end
def add_item(auth, item)
- self.rest_client.add_item(auth, {:id => self.id, :item_id => item.id})
+ # id is used for item_id only here..
+ self.rest_client.add_item(auth, {:list_id => self.id, :id => item.id})
end
def delete_item(auth, item)
View
4 lib/smartfm/modules/public_content.rb
@@ -11,8 +11,8 @@ def recent(params = {})
self.deserialize(hash) || []
end
- def find(list_id, params = {})
- params[:id] = list_id
+ def find(obj_id, params = {})
+ params[:id] = obj_id
hash = self.rest_client.find(params)
self.deserialize(hash)
end
View
2  lib/smartfm/rest_clients/list.rb
@@ -8,7 +8,7 @@ class Smartfm::RestClient::List < Smartfm::RestClient::Base
:matching => {:path => '/lists/matching/__keyword__'},
:likes => {:path => '/lists/__id__/likes' },
:create => {:path => '/lists', :http_method => :post},
- :add_item => {:path => '/lists/__id__/items', :http_method => :post},
+ :add_item => {:path => '/lists/__list_id__/items', :http_method => :post}, # id is used for item_id here..
:like! => {:path => '/lists/__id__/likes', :http_method => :post},
:delete => {:path => '/lists/__id__', :http_method => :delete},
:delete_item => {:path => '/lists/__id__/items/__item_id__', :http_method => :delete},
Please sign in to comment.
Something went wrong with that request. Please try again.