ef01ea18f1
* ui: Apply native class codemod to all services * ui: Apply native class codemod to routes * ui: Apply native class codemod to controllers * Fix up ember proxy `content` issue * Add a CreateTime on policy creation * Minor formatting * Convert child based saving to use ec instead of custom approach * Remove custom event source repo wrapping initializer * Repos here are no longer proxy objects revert to using them normally * Remove areas of code that were used to set up source backed repos
27 lines
661 B
JavaScript
27 lines
661 B
JavaScript
import RepositoryService from 'consul-ui/services/repository';
|
|
import statusFactory from 'consul-ui/utils/acls-status';
|
|
import isValidServerErrorFactory from 'consul-ui/utils/http/acl/is-valid-server-error';
|
|
import { PRIMARY_KEY, SLUG_KEY } from 'consul-ui/models/role';
|
|
|
|
const isValidServerError = isValidServerErrorFactory();
|
|
const status = statusFactory(isValidServerError, Promise);
|
|
const MODEL_NAME = 'role';
|
|
|
|
export default class RoleService extends RepositoryService {
|
|
getModelName() {
|
|
return MODEL_NAME;
|
|
}
|
|
|
|
getPrimaryKey() {
|
|
return PRIMARY_KEY;
|
|
}
|
|
|
|
getSlugKey() {
|
|
return SLUG_KEY;
|
|
}
|
|
|
|
status(obj) {
|
|
return status(obj);
|
|
}
|
|
}
|