update role api url

This commit is contained in:
Sylvain MATHIEU OBS 2023-09-12 15:53:08 +02:00
parent 7bad625fdd
commit 9ca10d6d6a

View File

@ -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});
}
}