diff --git a/CHANGELOG.md b/CHANGELOG.md index 217100391..9a0f72dfd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 1.0.19 +Bug fix + ## 1.0.18 Bug fix diff --git a/README.md b/README.md index e270ab562..7c0f66bb3 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Want to get involved? Join our Slack channel and help out! (http://flutter-parse To install, either add to your pubspec.yaml ```yml dependencies: - parse_server_sdk: ^1.0.18 + parse_server_sdk: ^1.0.19 ``` or clone this repository and add to your project. As this is an early development with multiple contributors, it is probably best to download/clone and keep updating as an when a new feature is added. diff --git a/lib/src/base/parse_constants.dart b/lib/src/base/parse_constants.dart index 530ab6dd6..0907c1353 100644 --- a/lib/src/base/parse_constants.dart +++ b/lib/src/base/parse_constants.dart @@ -1,7 +1,7 @@ part of flutter_parse_sdk; // Library -const String keySdkVersion = '1.0.18'; +const String keySdkVersion = '1.0.19'; const String keyLibraryName = 'Flutter Parse SDK'; // End Points diff --git a/lib/src/network/parse_live_query.dart b/lib/src/network/parse_live_query.dart index 3663b0a6f..066920f8b 100644 --- a/lib/src/network/parse_live_query.dart +++ b/lib/src/network/parse_live_query.dart @@ -98,7 +98,7 @@ class LiveQuery { if (_debug) { print('$_printConstLiveQuery: Done'); } - }, onError: (Error error, StackTrace stackTrace) { + }, onError: (Error error) { if (_debug) { print( '$_printConstLiveQuery: Error: ${error.runtimeType.toString()}'); diff --git a/lib/src/objects/parse_object.dart b/lib/src/objects/parse_object.dart index 74d0b1936..113b19c82 100644 --- a/lib/src/objects/parse_object.dart +++ b/lib/src/objects/parse_object.dart @@ -65,7 +65,7 @@ class ParseObject extends ParseBase implements ParseCloneable { Future create() async { try { final Uri url = getSanitisedUri(_client, '$_path'); - final String body = json.encode(toJson(forApiRQ: true)); + final String body = json.encode(toJson()); final Response result = await _client.post(url, body: body); //Set the objectId on the object after it is created. diff --git a/lib/src/objects/response/parse_response_builder.dart b/lib/src/objects/response/parse_response_builder.dart index b7e06767b..76b77d6c8 100644 --- a/lib/src/objects/response/parse_response_builder.dart +++ b/lib/src/objects/response/parse_response_builder.dart @@ -17,6 +17,9 @@ class _ParseResponseBuilder { if (isUnsuccessfulResponse(apiResponse)) { return buildErrorResponse(parseResponse, apiResponse); + } else if (isHealthCheck(apiResponse)) { + parseResponse.success = true; + return parseResponse; } else if (isSuccessButNoResults(apiResponse)) { return buildSuccessResponseWithNoResults( parseResponse, 1, 'Successful request, but no results found'); @@ -108,4 +111,8 @@ class _ParseResponseBuilder { return null; } } + + bool isHealthCheck(Response apiResponse) { + return apiResponse.body == "{\"status\":\"ok\"}"; + } } diff --git a/pubspec.yaml b/pubspec.yaml index c084f0a07..a6346a0b0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: parse_server_sdk description: Flutter plugin for Parse Server, (https://parseplatform.org), (https://back4app.com) -version: 1.0.18 +version: 1.0.19 homepage: https://github.com/phillwiggins/flutter_parse_sdk author: PhillWiggins