Skip to content

Version 1.0.1 - Code tidy on queries #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.0.2

Fixed login

## 1.0.1

Added documentation and GeoPoints
Expand Down
7 changes: 1 addition & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,7 @@ Want to get involved? Join our Slack channel and help out! (http://flutter-parse
To install, either add to your pubspec.yaml
```
dependencies:

parse_server_sdk: ^1.0.1




parse_server_sdk: ^1.0.2
```
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.

Expand Down
16 changes: 8 additions & 8 deletions lib/src/data/parse_data_user.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ class User extends ParseBase {
factory User() => _instance;

/// Returns a [User] from a [Map] object
fromJson(Map objectData) {
fromJson(objectData) {
if (getObjectData() == null) setObjectData(objectData);
getObjectData().addAll(objectData);
if (getObjectData().containsKey(ParseConstants.OBJECT_ID)) objectId = get(ParseConstants.OBJECT_ID).toString();
if (getObjectData().containsKey(ParseConstants.CREATED_AT)) createdAt = convertStringToDateTime(get(ParseConstants.CREATED_AT).toString());
if (getObjectData().containsKey(ParseConstants.UPDATED_AT)) updatedAt = convertStringToDateTime(get(ParseConstants.UPDATED_AT).toString());
if (getObjectData().containsKey(ACL)) acl = get(ACL).toString();
if (getObjectData().containsKey(USERNAME)) username = get(USERNAME).toString();
if (getObjectData().containsKey(PASSWORD)) password = get(PASSWORD).toString();
if (getObjectData().containsKey(EMAIL)) emailAddress = get(EMAIL).toString();
if (getObjectData().containsKey(ParseConstants.OBJECT_ID)) objectId = getObjectData()[ParseConstants.OBJECT_ID];
if (getObjectData().containsKey(ParseConstants.CREATED_AT)) createdAt = convertStringToDateTime(getObjectData()[ParseConstants.CREATED_AT]);
if (getObjectData().containsKey(ParseConstants.UPDATED_AT)) updatedAt = convertStringToDateTime(getObjectData()[ParseConstants.UPDATED_AT]);
if (getObjectData().containsKey(ACL)) acl = getObjectData()[ACL].toString();
if (getObjectData().containsKey(USERNAME)) username = getObjectData()[USERNAME];
if (getObjectData().containsKey(PASSWORD)) password = getObjectData()[PASSWORD];
if (getObjectData().containsKey(EMAIL)) emailAddress = getObjectData()[EMAIL];

if (updatedAt == null) updatedAt = createdAt;

Expand Down
5 changes: 2 additions & 3 deletions lib/src/objects/parse_user.dart
Original file line number Diff line number Diff line change
Expand Up @@ -167,15 +167,14 @@ class ParseUser {

var responseString = ' \n';

responseString += "----"
"\n${_client.data.appName} API Response ($className : ${type.toString()}) :";
responseString += "----""\n${_client.data.appName} API Response ($className : ${type.toString()}) :";

if (response.statusCode == 200 || response.statusCode == 201) {
responseString += "\nStatus Code: ${response.statusCode}";
responseString += "\nPayload: ${responseData.toString()}";

if (responseData.containsKey('objectId')) {
User.instance.fromJson(JsonDecoder().convert(response.body) as Map);
User.instance.fromJson(responseData);
_client.data.sessionId = responseData['sessionToken'];
}
} else {
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: parse_server_sdk
description: This is a Flutter plugin that allows communication with a Parse Server, (https://parseplatform.org)
version: 1.0.1
version: 1.0.2
homepage: https://github.com/phillwiggins/flutter_parse_sdk
author: PhillWiggins <[email protected]>

Expand Down