Ghost/ghost/admin/app/adapters/api-key.js
2020-11-20 10:23:19 +01:00

17 lines
404 B
JavaScript

import ApplicationAdapter from './application';
export default ApplicationAdapter.extend({
queryRecord(store, type, query) {
if (!query || query.id !== 'me') {
return this._super(...arguments);
}
let url = `${this.buildURL('users', 'me')}token/`;
return this.ajax(url, 'GET', {data: {}}).then((data) => {
return data;
});
}
});