Skip to content

Commit

Permalink
Fix collection listing (nsweeting#55)
Browse files Browse the repository at this point in the history
* Fix collection listing

* NestedResource -> Resource
  • Loading branch information
Lewis Chung authored and Ninigi committed Jan 30, 2019
1 parent 4bc4211 commit 30ff1c4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/shopify/resources/collection_listing.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ defmodule Shopify.CollectionListing do
@singular "collection_listing"
@plural "collection_listings"

use Shopify.NestedResource,
use Shopify.Resource,
import: [
:find,
:all
Expand Down Expand Up @@ -32,10 +32,10 @@ defmodule Shopify.CollectionListing do
end

@doc false
def find_url(top_id, nest_id) do
"applications/#{top_id}/" <> @plural <> "/#{nest_id}.json"
def find_url(id) do
@plural <> "/#{id}.json"
end

@doc false
def all_url(top_id), do: "applications/#{top_id}/" <> @plural <> ".json"
def all_url(), do: @plural <> ".json"
end

0 comments on commit 30ff1c4

Please sign in to comment.