Cloud sync improvements

This commit is contained in:
M66B
2023-01-15 19:10:34 +01:00
parent 630164979a
commit 632e045c7c
2 changed files with 114 additions and 109 deletions

View File

@@ -55,8 +55,9 @@ public class CloudSync {
private static final Map<String, Pair<byte[], byte[]>> keyCache = new HashMap<>();
public static JSONObject perform(Context context, String user, String password, JSONObject jrequest)
public static JSONObject perform(Context context, String user, String password, String command, JSONObject jrequest)
throws GeneralSecurityException, JSONException, IOException {
jrequest.put("command", command);
List<JSONObject> responses = new ArrayList<>();
for (JSONArray batch : partition(jrequest.getJSONArray("items"))) {
jrequest.put("items", batch);