Ronald 9d21736e9f
Add UI copyright headers files (#16614)
* Add copyright headers to UI files

* Ensure copywrite file ignores external libs
2023-03-14 09:18:55 -04:00

36 lines
681 B
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import Adapter from './application';
export default class AuthMethodAdapter extends Adapter {
requestForQuery(request, { dc, ns, partition, index, id }) {
return request`
GET /v1/acl/auth-methods?${{ dc }}
${{
ns,
partition,
index,
}}
`;
}
requestForQueryRecord(request, { dc, ns, partition, index, id }) {
if (typeof id === 'undefined') {
throw new Error('You must specify an id');
}
return request`
GET /v1/acl/auth-method/${id}?${{ dc }}
${{
ns,
partition,
index,
}}
`;
}
}