Fixed sorting on files, removed some logging

This commit is contained in:
2023-07-16 22:15:24 +02:00
parent 575343ff82
commit a5b2242dc3
17 changed files with 210 additions and 180 deletions

View File

@ -1,4 +1,3 @@
import 'dart:developer';
import 'dart:io';
import 'package:http/http.dart' as http;
@ -14,15 +13,10 @@ class FileSharingApi {
headers.putIfAbsent("OCS-APIRequest", () => "true");
Uri endpoint = Uri.https("${AccountData().buildHttpAuthString()}@cloud.marianum-fulda.de", "/ocs/v2.php/apps/files_sharing/api/v1/shares", query.toJson().map((key, value) => MapEntry(key, value.toString())));
log("request file share");
Response response = await http.post(endpoint, headers: headers);
if(response.statusCode != HttpStatus.ok) {
throw Exception("Api call failed with ${response.statusCode}: ${response.body}");
} else {
log("File share successfull: ${response.body}");
}
}
}