2016-05-24 15:06:59 +03:00
|
|
|
import ApplicationAdapter from 'ghost-admin/adapters/application';
|
|
|
|
import SlugUrl from 'ghost-admin/mixins/slug-url';
|
2014-08-06 20:48:18 +04:00
|
|
|
|
2015-11-23 16:48:08 +03:00
|
|
|
export default ApplicationAdapter.extend(SlugUrl, {
|
2017-01-14 00:14:54 +03:00
|
|
|
queryRecord(store, type, query) {
|
|
|
|
if (!query || query.id !== 'me') {
|
|
|
|
return this._super(...arguments);
|
|
|
|
}
|
|
|
|
|
|
|
|
let url = this.buildURL(type.modelName, 'me', null, 'findRecord');
|
|
|
|
|
|
|
|
return this.ajax(url, 'GET', {data: {include: 'roles'}});
|
2014-07-21 01:48:24 +04:00
|
|
|
}
|
|
|
|
});
|