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 @@ -116,7 +116,7 @@ public void testUnsubscribeWhenSubscribedToCallback() throws Exception {
116
116
@ Test
117
117
public void testErrorWhileSubscribing () throws Exception {
118
118
ParseQuery .State state = mock (ParseQuery .State .class );
119
- when (state .toJSON ( any ( ParseEncoder . class ) )).thenThrow (new RuntimeException ("forced error" ));
119
+ when (state .constraints ( )).thenThrow (new RuntimeException ("forced error" ));
120
120
121
121
ParseQuery .State .Builder builder = mock (ParseQuery .State .Builder .class );
122
122
when (builder .build ()).thenReturn (state );
You can’t perform that action at this time.
0 commit comments