Skip to content

Commit

Permalink
gwt: Use new services.py reply format for login().
Browse files Browse the repository at this point in the history
  • Loading branch information
calin-iorgulescu committed Jan 22, 2015
1 parent 671ae62 commit 34b0c2d
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
public class AuthenticationResponseDecoder implements JSONDecoder<AuthenticationResponse> {

public static final String statusKey = "status";
public static final String usernameKey = "username";
public static final String useridKey = "userid";
public static final String fullnameKey = "fullname";
public static final String usernameKey = "username";
public static final String infoKey = "info";

@Override
Expand All @@ -29,8 +29,8 @@ public AuthenticationResponse decode(String text) throws Exception {
}

String username = jsonObj.get(usernameKey).isString().stringValue();
String userid = jsonObj.get(useridKey).isString().stringValue();
return new AuthenticationResponse(status, new User(userid, username), info);
String fullname = jsonObj.get(fullnameKey).isString().stringValue();
return new AuthenticationResponse(status, new User(username, fullname), info);
}

}

0 comments on commit 34b0c2d

Please sign in to comment.