diff --git a/src/assets/js/wishlist.js b/src/assets/js/wishlist.js index c9b9ddb9..fe0264c0 100644 --- a/src/assets/js/wishlist.js +++ b/src/assets/js/wishlist.js @@ -33,15 +33,16 @@ $(function() { } /** - * Get wishlist by hash + * Get wishlist by Id */ if (!wishlist && wishthis.$_GET.hash) { - fetch('/api/wishlists/' + wishthis.$_GET.hash, { method: 'GET' }) + var wishlistId = $('.wishlist-cards[data-wishlist]').attr('data-wishlist'); + + fetch('/api/wishlists/' + wishlistId, { method: 'GET' }) .then(handleFetchError) .then(handleFetchResponse) .then(function(response) { wishlist = response.results; - console.log(wishlist); }); }