mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-13 14:39:52 +03:00
034812ac02
refs https://github.com/TryGhost/Ghost/issues/14101 - `@classic` decorator is not required on adapter classes - small cleanup of Octane migration code
15 lines
420 B
JavaScript
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;
|
|
});
|
|
}
|
|
}
|