onCall method

  1. @override
FutureOr<AccessEvent> onCall(
  1. Request request
)
override

Implementation

@override
FutureOr<AccessEvent> onCall(Request request) async {
  // var dataAccess = context.dataAccess;
  var acc = await accessBuilder(request, context);
  acc.context = context;
  // DbResult result;
  //
  return acc;

  // switch (acc.access.type) {
  //   case AccessType.read:
  //     result = ((await dataAccess.read(acc)));
  //     break;
  //   case AccessType.readMultiple:
  //     result = ((await dataAccess.readList(acc)));
  //     break;
  //   case AccessType.create:
  //     result = ((await dataAccess.create(acc)));
  //     break;
  //   case AccessType.update:
  //     result = ((await dataAccess.update(acc)));
  //     break;
  //   case AccessType.exists:
  //     result = ((await dataAccess.exists(acc)));
  //     break;
  //   case AccessType.listen:
  //     throw UnimplementedError();
  //   case AccessType.delete:
  //     result = ((await dataAccess.delete(acc)));
  //     break;
  //   case AccessType.count:
  //     result = ((await dataAccess.count(acc)));
  //     break;
  //   case AccessType.aggregation:
  //     result = await dataAccess.aggregation(acc);
  //     break;
  // }
  // return request.response(result.data,
  //     headers: result.headers, statusCode: result.statusCode);
}