diff --git a/ghost/admin/app/adapters/base.js b/ghost/admin/app/adapters/base.js index c3215636f1..eef73f30b7 100644 --- a/ghost/admin/app/adapters/base.js +++ b/ghost/admin/app/adapters/base.js @@ -2,6 +2,7 @@ import AjaxServiceSupport from 'ember-ajax/mixins/ajax-support'; import RESTAdapter from '@ember-data/adapter/rest'; import ghostPaths from 'ghost-admin/utils/ghost-paths'; import {inject as service} from '@ember/service'; +import {underscore} from '@ember/string'; export default RESTAdapter.extend(AjaxServiceSupport, { host: window.location.origin, @@ -24,6 +25,11 @@ export default RESTAdapter.extend(AjaxServiceSupport, { return this.ajax(this.buildURL(type.modelName, id), 'GET', {data: query}); }, + pathForType() { + const type = this._super(...arguments); + return underscore(type); + }, + buildURL() { // Ensure trailing slashes let url = this._super(...arguments);