mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2024-12-21 13:57:48 +00:00
update role api url
This commit is contained in:
parent
7bad625fdd
commit
9ca10d6d6a
@ -24,22 +24,22 @@ export class RoleService {
|
||||
constructor(private httpController: HttpController) { }
|
||||
|
||||
get(controller: Controller) {
|
||||
return this.httpController.get<Role[]>(controller, '/roles');
|
||||
return this.httpController.get<Role[]>(controller, '/access/roles');
|
||||
}
|
||||
|
||||
delete(controller: Controller, role_id: string) {
|
||||
return this.httpController.delete(controller, `/roles/${role_id}`);
|
||||
return this.httpController.delete(controller, `/access/roles/${role_id}`);
|
||||
}
|
||||
|
||||
create(controller: Controller, newRole: { name: string; description: string }) {
|
||||
return this.httpController.post(controller, `/roles`, newRole);
|
||||
return this.httpController.post(controller, `/access/roles`, newRole);
|
||||
}
|
||||
|
||||
getById(controller: Controller, roleId: string) {
|
||||
return this.httpController.get<Role>(controller, `/roles/${roleId}`);
|
||||
return this.httpController.get<Role>(controller, `/access/roles/${roleId}`);
|
||||
}
|
||||
|
||||
update(controller: Controller, role: Role) {
|
||||
return this.httpController.put(controller, `/roles/${role.role_id}`, {name: role.name, description: role.description});
|
||||
return this.httpController.put(controller, `/access/roles/${role.role_id}`, {name: role.name, description: role.description});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user