updateClientId method

Future<RequestResponse> updateClientId()

Calls renovation_manager frappe site and the server will set. x-client-site cookie which is helpful in routing the requests.

Returns the client id

If the clientId is set, the saved clientId will be returned.

Otherwise, it will be fetched from the backend using the app renovation_bench

Implementation

Future<RequestResponse<dynamic>> updateClientId() async {
  final id = Request.getClientId();
  if (id != null) {
    await verifyClientId(id);
    return RequestResponse.success<String>(id);
  }
  return await verifyClientId(id);
}