updateRole method

Future<KuzzleRole> updateRole(
  1. String id,
  2. Map<String, dynamic> body, {
  3. bool? waitForRefresh,
  4. bool? force,
})

Updates a security role definition

Note: partial updates are not supported for roles, this API route will replace the entire role content with the provided one.

Implementation

Future<KuzzleRole> updateRole(String id, Map<String, dynamic> body,
    {bool? waitForRefresh, bool? force}) async {
  final response = await kuzzle.query(KuzzleRequest(
    controller: name,
    action: 'updateRole',
    uid: id,
    force: force,
    waitForRefresh: waitForRefresh,
    body: body,
  ));

  return KuzzleRole.fromKuzzleResponse(kuzzle, response);
}