Search in sources :

Example 1 with IdVerificationListResponse

use of org.pmiops.workbench.model.IdVerificationListResponse in project workbench by all-of-us.

the class ProfileController method getIdVerificationsForReview.

@Override
@AuthorityRequired({ Authority.REVIEW_ID_VERIFICATION })
public ResponseEntity<IdVerificationListResponse> getIdVerificationsForReview() {
    IdVerificationListResponse response = new IdVerificationListResponse();
    List<Profile> responseList = new ArrayList<Profile>();
    try {
        for (User user : userService.getNonVerifiedUsers()) {
            responseList.add(profileService.getProfile(user));
        }
    } catch (ApiException e) {
        log.log(Level.INFO, "Error calling FireCloud", e);
        return ResponseEntity.status(e.getCode()).build();
    }
    response.setProfileList(responseList);
    return ResponseEntity.ok(response);
}
Also used : IdVerificationListResponse(org.pmiops.workbench.model.IdVerificationListResponse) User(org.pmiops.workbench.db.model.User) ArrayList(java.util.ArrayList) Profile(org.pmiops.workbench.model.Profile) ApiException(org.pmiops.workbench.firecloud.ApiException) AuthorityRequired(org.pmiops.workbench.annotations.AuthorityRequired)

Aggregations

ArrayList (java.util.ArrayList)1 AuthorityRequired (org.pmiops.workbench.annotations.AuthorityRequired)1 User (org.pmiops.workbench.db.model.User)1 ApiException (org.pmiops.workbench.firecloud.ApiException)1 IdVerificationListResponse (org.pmiops.workbench.model.IdVerificationListResponse)1 Profile (org.pmiops.workbench.model.Profile)1