createFirstAdmin method

Future<KuzzleUser> createFirstAdmin(
  1. String id,
  2. Map<String, dynamic> body, {
  3. bool? reset,
})

Creates a Kuzzle administrator account, only if none exist.

Implementation

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

  return KuzzleUser.fromKuzzleResponse(kuzzle, response);
}