From 1f05f1d091cd1fd2554545216b3be0495d23f6b1 Mon Sep 17 00:00:00 2001 From: BalazsManus Date: Fri, 14 Feb 2025 08:03:54 +0100 Subject: [PATCH] nuke out cloud sync --- refilc/lib/api/client.dart | 33 ++------------------------------- 1 file changed, 2 insertions(+), 31 deletions(-) diff --git a/refilc/lib/api/client.dart b/refilc/lib/api/client.dart index 91466e1..27f8545 100644 --- a/refilc/lib/api/client.dart +++ b/refilc/lib/api/client.dart @@ -61,6 +61,8 @@ class FilcAPI { static Future checkConnectivity() async => (await Connectivity().checkConnectivity())[0] != ConnectivityResult.none; + + // nem tudom nem vazar-e senkit se, de mar ertelmetlen ez static Future?> getSchools() async { try { http.Response res = await http.get(Uri.parse(schoolList)); @@ -70,16 +72,6 @@ class FilcAPI { .cast() .map((json) => School.fromJson(json)) .toList(); - schools.add(School( - city: "Stockholm", - instituteCode: "refilc-test-sweden", - name: "reFilc Test SE - Leo Ekström High School", - )); - schools.add(School( - city: "Madrid", - instituteCode: "refilc-test-spain", - name: "reFilc Test ES - Emilio Obrero University", - )); return schools; } else { throw "HTTP ${res.statusCode}: ${res.body}"; @@ -397,27 +389,6 @@ class FilcAPI { // cloud sync static Future cloudSync(Map data, String token) async { - try { - var client = http.Client(); - - http.Response res = await client.post( - Uri.parse(cloudSyncApi), - body: data, - headers: { - 'Content-Type': 'application/x-www-form-urlencoded', - 'Authorization': 'Bearer $token', - }, - ); - - if (res.statusCode != 200) { - throw "HTTP ${res.statusCode}: ${res.body}"; - } - - return jsonDecode(res.body); - } on Exception catch (error, stacktrace) { - log("ERROR: FilcAPI.cloudSync: $error $stacktrace"); - } - return null; } }