Skip to content

Commit

Permalink
feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
connorlbark committed Dec 12, 2024
1 parent 77625c2 commit f322323
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 20 deletions.
2 changes: 1 addition & 1 deletion api-admin/src/main/resources/api/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2110,7 +2110,7 @@ paths:
$ref: '#/components/responses/ServerError'
/api/portals/v1/{portalShortcode}/studies/{studyShortcode}/env/{envName}/enrollees/{enrolleeShortcode}/file/{fileName}:
get:
summary: Returns the binary file data for the file of the given shortcode
summary: Returns the binary file data of the given file name
tags: [ participantFile ]
operationId: download
parameters:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,4 @@ public void deleteByEnrolleeId(UUID enrolleeId) {
public Optional<ParticipantFile> findByEnrolleeIdAndFileName(UUID enrolleeId, String fileName) {
return findByTwoProperties("enrollee_id", enrolleeId, "file_name", fileName);
}

public List<ParticipantFile> findAllByFileNameForEnrollee(UUID enrolleeId, List<String> participantFileNames) {
return jdbi.withHandle(handle ->
handle.createQuery("""
select * from %s
where enrollee_id = :enrolleeId
and file_name in (<fileNames>)
""".formatted(tableName))
.bind("enrolleeId", enrolleeId)
.bindList("fileNames", participantFileNames)
.mapTo(clazz)
.stream()
.toList()
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,4 @@ public void deleteByEnrolleeId(UUID enrolleeId) {
public Optional<ParticipantFile> findByEnrolleeIdAndFileName(UUID enrolleeId, String fileName) {
return dao.findByEnrolleeIdAndFileName(enrolleeId, fileName);
}

public List<ParticipantFile> findAllByFileNameForEnrollee(UUID enrolleeId, List<String> participantFileNames) {
return dao.findAllByFileNameForEnrollee(enrolleeId, participantFileNames);
}
}

0 comments on commit f322323

Please sign in to comment.