updateCategory function

Future<HttpRequest> updateCategory(
  1. Key key,
  2. Category obj
)

Implementation

Future<HttpRequest> updateCategory(Key key, Category obj) async {
  var route = getEndpoint("stock");
  var url = "${route}/info/${key.toJson()}";

  final data = jsonEncode(obj.toJson());

  return invokeService("PUT", url, data);
}