Skip to content

Commit

Permalink
delete organisms added
Browse files Browse the repository at this point in the history
  • Loading branch information
nathandunn committed Aug 25, 2020
1 parent bd93d94 commit d628d59
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ class OrganismController {
, @RestApiParam(name = "password", type = "password", paramType = RestApiParamType.QUERY)
, @RestApiParam(name = "id", type = "string or number", paramType = RestApiParamType.QUERY, description = "Pass an Organism ID or commonName that corresponds to the organism to be removed")
, @RestApiParam(name = "organism", type = "string or number", paramType = RestApiParamType.QUERY, description = "Pass an Organism ID or commonName that corresponds to the organism to be removed")
, @RestApiParam(name = "returnAllOrganisms", type = "boolean", paramType = RestApiParamType.QUERY, description = "(optional) Return all organisms (true / false) (default true)")
])
@Transactional
def deleteOrganism() {
Expand Down Expand Up @@ -101,7 +102,8 @@ class OrganismController {
assert directoryToRemove.deleteDir()
}

findAllOrganisms()
Boolean returnAllOrganisms = organismJson.returnAllOrganisms!=null ? Boolean.valueOf(organismJson.returnAllOrganisms) : true
render returnAllOrganisms ? findAllOrganisms() : new JSONArray()

}
catch (Exception e) {
Expand Down

0 comments on commit d628d59

Please sign in to comment.