Skip to content

Commit

Permalink
fixes an issue with getting document
Browse files Browse the repository at this point in the history
  • Loading branch information
temi committed Dec 13, 2024
1 parent 9809dd7 commit 3fe2c1e
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ class DocumentController {
WebService webService
GrailsApplication grailsApplication

def get(String documentId) {
if (!documentId) {
def get(String id) {
if (!id) {
render text: [message: "Document not found"] as JSON, status: HttpStatus.SC_NOT_FOUND
return
}

def document = documentService.get(documentId)
def document = documentService.get(id)
if (!document.error) {
render text: document as JSON, status: HttpStatus.SC_OK
}
Expand Down

1 comment on commit 3fe2c1e

@jack-brinkman
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍🏼

Please sign in to comment.