You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
consul/ui-v2/app/services/repository/intention-permission.js

19 lines
576 B

import RepositoryService from 'consul-ui/services/repository';
const modelName = 'intention-permission';
export default RepositoryService.extend({
getModelName: function() {
return modelName;
},
create: function(obj = {}) {
// intention-permission and intention-permission-http
// are currently treated as one and the same
return this.store.createFragment(this.getModelName(), {
...obj,
HTTP: this.store.createFragment('intention-permission-http', obj.HTTP || {}),
});
},
persist: function(item) {
return item.execute();
},
});