1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-24 23:59:47 +02:00

License key workflow improved

Co-Authored-By: Saul S <sauls8t@users.noreply.github.com>
This commit is contained in:
McMatts 2018-06-15 14:26:02 +01:00
parent 27fde0dac8
commit 30856433f8
6 changed files with 14 additions and 25 deletions

View file

@ -9,18 +9,7 @@
//
// https://documize.com
import { inject as service } from '@ember/service';
import Controller from '@ember/controller';
export default Controller.extend({
global: service(),
actions: {
saveLicense() {
if(this.get('session.isGlobalAdmin')) {
return this.get('global').saveLicense(this.model.license).then(() => {
});
}
}
}
});

View file

@ -11,7 +11,6 @@
import { inject as service } from '@ember/service';
import Route from '@ember/routing/route';
import RSVP from 'rsvp';
import AuthenticatedRouteMixin from 'ember-simple-auth/mixins/authenticated-route-mixin';
export default Route.extend(AuthenticatedRouteMixin, {
@ -26,9 +25,7 @@ export default Route.extend(AuthenticatedRouteMixin, {
},
model() {
return RSVP.hash({
license: this.get('global').getLicense()
});
return this.get('global').getLicense();
},
activate() {

View file

@ -1 +1 @@
{{customize/license-key model=model saveLicense=(action 'saveLicense')}}
{{customize/license-key license=model}}