Skip to content

Commit

Permalink
delegating getUserId to SessionContext
Browse files Browse the repository at this point in the history
  • Loading branch information
tubbynl committed Jun 14, 2018
1 parent 95a5427 commit 2895b15
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/main/java/com/bunq/sdk/context/UserContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@ public class UserContext {
private UserCompany userCompany;
private UserPerson userPerson;
private MonetaryAccountBank primaryMonetaryAccountBank;
private final Integer userId;

public UserContext(ApiContext apiContext) {
this.apiContext = apiContext;
this.userId = apiContext.getSessionContext().getUserId();
refreshContext();
}

Expand Down Expand Up @@ -55,7 +53,7 @@ public void refreshContext() {
}

public Integer getUserId() {
return this.userId;
return this.apiContext.getSessionContext().getUserId();
}

public boolean isOnlyUserPersonSet() {
Expand Down

0 comments on commit 2895b15

Please sign in to comment.