Ghost/ghost/admin/app/adapters/api-key.js
Kevin Ansfield 034812ac02 Dropped use of @classic decorator in adapters
refs https://github.com/TryGhost/Ghost/issues/14101

- `@classic` decorator is not required on adapter classes
- small cleanup of Octane migration code
2022-09-02 19:14:40 +01:00

15 lines
420 B
JavaScript

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