open-nomad/ui/app/adapters/policy.js
2023-04-10 15:36:59 +00:00

21 lines
504 B
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import { default as ApplicationAdapter, namespace } from './application';
import classic from 'ember-classic-decorator';
@classic
export default class PolicyAdapter extends ApplicationAdapter {
namespace = namespace + '/acl';
urlForCreateRecord(_modelName, model) {
return this.urlForUpdateRecord(model.attr('name'), 'policy');
}
urlForDeleteRecord(id) {
return this.urlForUpdateRecord(id, 'policy');
}
}