Ghost/ghost/admin/app/adapters/theme.js
Kevin Ansfield 96743e64cd 🎨 move theme activation to /themes endpoint
requires https://github.com/TryGhost/Ghost/pull/8093
- adds `theme.activate()` method and associated adapter method for activating themes rather than relying on `settings.activeTheme`
- minor refactors to the `modals/upload-theme` component to use a full theme model
2017-03-08 10:46:33 +00:00

14 lines
327 B
JavaScript

import ApplicationAdapter from './application';
export default ApplicationAdapter.extend({
activate(model) {
let url = `${this.buildURL('theme', model.get('id'))}activate/`;
return this.ajax(url, 'PUT', {data: {}}).then((data) => {
return this.store.pushPayload(data);
});
}
});