File tree 2 files changed +9
-2
lines changed
2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 22
22
jsonObject .put ("requestId" , requestId );
23
23
jsonObject .put ("sessionToken" , sessionToken );
24
24
25
- JSONObject queryJsonObject = state .toJSON (PointerEncoder .get ());
25
+ JSONObject queryJsonObject = new JSONObject ();
26
+ queryJsonObject .put ("className" , state .className ());
27
+
28
+ // TODO: add support for fields
29
+ // https://github.com/ParsePlatform/parse-server/issues/3671
30
+
31
+ PointerEncoder pointerEncoder = PointerEncoder .get ();
32
+ queryJsonObject .put ("where" , pointerEncoder .encode (state .constraints ()));
26
33
27
34
jsonObject .put ("query" , queryJsonObject );
28
35
Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ public void testUnsubscribeWhenSubscribedToCallback() throws Exception {
117
117
@ Test
118
118
public void testErrorWhileSubscribing () throws Exception {
119
119
ParseQuery .State state = mock (ParseQuery .State .class );
120
- when (state .toJSON ( any ( ParseEncoder . class ) )).thenThrow (new RuntimeException ("forced error" ));
120
+ when (state .constraints ( )).thenThrow (new RuntimeException ("forced error" ));
121
121
122
122
ParseQuery .State .Builder builder = mock (ParseQuery .State .Builder .class );
123
123
when (builder .build ()).thenReturn (state );
You can’t perform that action at this time.
0 commit comments