diff --git a/lib/mock/db_mock.dart b/lib/mock/db_mock.dart index dac8c9f..4e5d0e6 100644 --- a/lib/mock/db_mock.dart +++ b/lib/mock/db_mock.dart @@ -1,4 +1,3 @@ -import 'package:smoke_cess_app/interface/db_record.dart'; import 'package:smoke_cess_app/models/mood.dart'; import 'package:smoke_cess_app/models/relapse.dart'; import 'package:smoke_cess_app/models/sleep.dart'; diff --git a/lib/services/export_service.dart b/lib/services/export_service.dart index 12afa12..9758270 100644 --- a/lib/services/export_service.dart +++ b/lib/services/export_service.dart @@ -31,13 +31,13 @@ class ExportService { }; } - void exportData() async { + Future exportData() async { Map> body = await _loadRecords(); final response = await http.post(url, headers: { 'Content-Type': 'application/json; charset=UTF-8', }, body: jsonEncode(body)); - print(response.statusCode); + return response.statusCode >= 400 ? 0 : 1; } }