-
Notifications
You must be signed in to change notification settings - Fork 490
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -827,14 +827,8 @@ public Response getFixityAlgorithm() { | |
|
||
@GET | ||
@Path("{id}/guestbookResponses/count") | ||
public Response getCountGuestbookResponses(@PathParam("id") String dataFileId) { | ||
DataFile dataFile; | ||
try { | ||
dataFile = findDataFileOrDie(dataFileId); | ||
} catch (WrappedResponse wr) { | ||
return wr.getResponse(); | ||
} | ||
return ok(guestbookResponseService.getCountGuestbookResponsesByDataFileId(dataFile.getId()).toString()); | ||
public Response getCountGuestbookResponses(@PathParam("id") long dataFileId) { | ||
return ok(guestbookResponseService.getCountGuestbookResponsesByDataFileId(dataFileId).toString()); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
GPortas
Author
Contributor
|
||
} | ||
|
||
@GET | ||
|
This call will throw a NoResultException for a bad ID which, unlike the findDataFileOrDie call, won't return a 404 response as it should (I assume an uncaught exception will be a 500 error?). I think you should still be able to avoid the extra query if you handle the exception.