refactor: configure cache api clients via constructor options
This commit is contained in:
@@ -4,22 +4,7 @@ import CacheEnabledApiClient from './CacheEnabledApiClient';
|
||||
|
||||
class Agents extends CacheEnabledApiClient {
|
||||
constructor() {
|
||||
super('agents', { accountScoped: true });
|
||||
}
|
||||
|
||||
// eslint-disable-next-line class-methods-use-this
|
||||
get cacheModelName() {
|
||||
return 'account_user';
|
||||
}
|
||||
|
||||
// eslint-disable-next-line class-methods-use-this
|
||||
extractDataFromResponse(response) {
|
||||
return response.data;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line class-methods-use-this
|
||||
marshallData(dataToParse) {
|
||||
return { data: dataToParse };
|
||||
super('agents', { accountScoped: true, cacheModel: 'account_user' });
|
||||
}
|
||||
|
||||
bulkInvite({ emails }) {
|
||||
|
||||
Reference in New Issue
Block a user