import ApplicationAdapter from './application';

export default ApplicationAdapter.extend({
    query(store, type, query) {
        if (!query.reverse) {
            return this._super(...arguments);
        }
        delete query.reverse;
        var { crate } = query;
        delete query.crate;
        return this.ajax(`${this.urlPrefix()}/crates/${crate.get('id')}/reverse_dependencies`,
            'GET', { data: query });
    },
});

import ApplicationAdapter from './application';

export default ApplicationAdapter.extend({
    query(store, type, query) {
        if (!query.reverse) {
            return this._super(...arguments);
        }
        delete query.reverse;
        var { crate } = query;
        delete query.crate;
        return this.ajax(`/${this.urlPrefix()}/crates/${crate.get('id')}/reverse_dependencies`,
            'GET', { data: query });
    },
});

Make reverse dependencies url absolute
Make reverse dependencies url absolute

The base url behavior changed in the ember upgrade.

Fixes #553.
