7103ce1957
Co-authored-by: Phil Renaud <phil@riotindustries.com> Co-authored-by: Luiz Aoqui <luiz@hashicorp.com>
18 lines
484 B
JavaScript
18 lines
484 B
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: MPL-2.0
|
|
*/
|
|
|
|
import ApplicationAdapter from './application';
|
|
import classic from 'ember-classic-decorator';
|
|
import { pluralize } from 'ember-inflector';
|
|
|
|
@classic
|
|
export default class NodePoolAdapter extends ApplicationAdapter {
|
|
urlForFindAll(modelName) {
|
|
let [relationshipResource, resource] = modelName.split('-');
|
|
resource = pluralize(resource);
|
|
return `/v1/${relationshipResource}/${resource}`;
|
|
}
|
|
}
|