diff --git a/lib/dusk/public/js/dusk.js b/lib/dusk/public/js/dusk.js index 5eeeba9..36eae3c 100644 --- a/lib/dusk/public/js/dusk.js +++ b/lib/dusk/public/js/dusk.js @@ -92,7 +92,7 @@ var Dusk = function(target) { dataType: 'json', error: function(xhr, textStatus, errorThrown) { console.log(errorThrown) }, type: 'POST', - url: window.location.href.replace(/metrics/, 'favorites') + url: window.location.pathname.replace(/metrics/, 'favorites') }).done(function(d) { console.log('favorite successful') cb() @@ -106,7 +106,7 @@ var Dusk = function(target) { dataType: 'json', error: function(xhr, textStatus, errorThrown) { console.log(errorThrown) }, type: 'DELETE', - url: window.location.href.replace(/metrics/, 'favorites') + url: window.location.pathname.replace(/metrics/, 'favorites') }).done(function(d) { console.log('unfavorite successful') cb()