mGetUsers method

Future<List<KuzzleUser>> mGetUsers(
  1. List<String> ids, {
  2. String? verb,
})

Gets multiple security roles.

Implementation

Future<List<KuzzleUser>> mGetUsers(List<String> ids, {String? verb}) async {
  final response = await kuzzle.query(KuzzleRequest(
      controller: name,
      action: 'mGetUsers',
      verb: verb,
      body: <String, dynamic>{
        'ids': ids,
      }));

  final users = <KuzzleUser>[];

  for (final hit in response.result['hits']) {
    users.add(KuzzleUser(kuzzle,
        uid: hit['_id'] as String?,
        content: hit['_source'] as Map<String, dynamic>?));
  }

  return users;
}