Skip to content

Commit 953b54a

Browse files
committed
Aggregate result type changed to ParseNetworkResponse to handle custom objects.
1 parent 7dabdcb commit 953b54a

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

packages/dart/example/main.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ Future<void> main() async {
3131
},
3232
}).execute();
3333

34-
print(res.result);
34+
print('${res.statusCode}, ${res.data}');
3535
}

packages/dart/lib/src/network/parse_aggregate.dart

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class ParseAggregate {
5959
///
6060
/// Returns a [ParseResponse] containing the results of the aggregation.
6161
/// Throws [ArgumentError] if the pipeline is empty.
62-
Future<ParseResponse> execute() async {
62+
Future<ParseNetworkResponse> execute() async {
6363
Map<String, String> _pipeline = {};
6464

6565
if (pipeline.isEmpty) {
@@ -73,20 +73,14 @@ class ParseAggregate {
7373
});
7474
}
7575

76-
final debugBool = isDebugEnabled(objectLevelDebug: debug);
76+
// final debugBool = isDebugEnabled(objectLevelDebug: debug);
7777
final result = await ParseObject(className)._client.get(
7878
Uri.parse('${ParseCoreData().serverUrl}$keyEndPointAggregate$className').replace(
7979
queryParameters: {'pipeline': jsonEncode(pipeline.entries.map((e) => {e.key: e.value}).toList())}
8080
).toString(),
8181
);
8282

8383

84-
return handleResponse<ParseObject>(
85-
ParseObject(className),
86-
result,
87-
ParseApiRQ.get,
88-
debugBool,
89-
parseClassName ?? 'ParseBase',
90-
);
84+
return result;
9185
}
9286
}

0 commit comments

Comments
 (0)