Fixes json routes when using rq-dashboard from a url_prefix other than /

I noticed that all of the JSON endpoints were failing when trying to run rq-dashboard integrated within my own app. The problem was just in dashboard.js. Tested standalone and it still works fine.