Skip to content

Commit

Permalink
removed seperate function
Browse files Browse the repository at this point in the history
  • Loading branch information
connor-addison-h committed May 30, 2024
1 parent 7d4ebda commit 68533a1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
3 changes: 0 additions & 3 deletions app/femr/business/services/core/IUserService.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,6 @@ public interface IUserService {
*/
ServiceResponse<UserItem> updateUser(UserItem userItem, String newPassword);


ServiceResponse<UserItem> updateUserLanguageCode(UserItem userItem, String languageCode);

/**
* Retrieves a user by their email address. TODO: stop returning data models
*
Expand Down
19 changes: 0 additions & 19 deletions app/femr/business/services/system/UserService.java
Original file line number Diff line number Diff line change
Expand Up @@ -250,25 +250,6 @@ public ServiceResponse<UserItem> updateUser(UserItem userItem, String newPasswor
return response;
}

@Override
public ServiceResponse<UserItem> updateUserLanguageCode(UserItem userItem, String languageCode) {
ServiceResponse<UserItem> response = new ServiceResponse<>();
if (userItem == null) {
response.addError("", "send a user");
return response;
}

try {
IUser user = userRepository.retrieveUserById(userItem.getId());
user.setLanguageCode(languageCode);
user = userRepository.updateUser(user);
response.setResponseObject(itemModelMapper.createUserItem(user));
} catch (Exception ex) {
response.addError("", ex.getMessage());
}
return response;
}


/**
* {@inheritDoc}
Expand Down

0 comments on commit 68533a1

Please sign in to comment.