healthCheck method

  1. @override
Future healthCheck()
override

transaction healthCheck

Implementation

@override
Future<dynamic> healthCheck() async {
  debugPrint("------------------- HealthCheck Start -------------------");
  DataInitRet? initData = await _storage.initData;
  if (initData != null) {
    debugPrint("initData: ${initData.toJson()}");
    ApiResponse<EncApiRet> apiRegResp = await DtbLinkNet.instance.request(
      method: Method.post,
      path: "/v1/health_check",
      prefix: "register tran",
      fromJson: (dynamic ret) => EncApiRet.fromJson(ret),
      timeOut: const Duration(seconds: 20),
    );
    debugPrint("apiRegResp: ${apiRegResp.toJson()}");
    return apiRegResp.ret;
  }
  return ApiResponse(statusCode: "ng", msg: Msg());
}