open-nomad/ui/app/controllers/settings/tokens.js

21 lines
408 B
JavaScript
Raw Normal View History

2017-09-19 14:47:10 +00:00
import Ember from 'ember';
const { Controller, inject } = Ember;
export default Controller.extend({
token: inject.service(),
actions: {
setTokenProperty(property, event) {
this.get('token').set(property, event.currentTarget.value);
},
clearTokenProperties() {
this.get('token').setProperties({
secret: undefined,
accessor: undefined,
});
},
},
});