patch method

  1. @override
Future patch(
  1. ApiRequest request
)
override

Implementation

@override
Future patch(ApiRequest request) async {
  if (!allowPatch) {
    throw ApiRequestException.methodNotAllowed();
  }

  final id = request.route.getParam<TId>(idParam);
  final json = await request.getJsonBody();
  final data = bean.toObject(json);
  final result = await patchElement(request, id, data);
  return result;
}