mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-03 03:55:26 +03:00
fdc24103cc
no issue * ran native classes codemod for app/adapters * migrated slug-url mixin to a utility
17 lines
476 B
JavaScript
17 lines
476 B
JavaScript
import ApplicationAdapter from './application';
|
|
import classic from 'ember-classic-decorator';
|
|
|
|
@classic
|
|
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;
|
|
});
|
|
}
|
|
}
|