Skip to content

Commit 5cc9179

Browse files
committed
#16 fixes issue with a 404 being returned after a successful service call, because the return type of the controller action was the user entity
1 parent 718934b commit 5cc9179

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

grails-app/controllers/au/org/ala/alerts/WebserviceController.groovy

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package au.org.ala.alerts
22

33
import au.ala.org.ws.security.RequireApiKey
4+
import grails.converters.JSON
45
import org.apache.http.HttpStatus
56
import org.codehaus.groovy.grails.web.servlet.mvc.GrailsParameterMap
67

@@ -338,6 +339,8 @@ class WebserviceController {
338339
user.notifications?.clear()
339340
user.save(flush: true)
340341
}
342+
343+
render ([success: true] as JSON)
341344
} else {
342345
response.status = HttpStatus.SC_NOT_FOUND
343346
response.sendError(HttpStatus.SC_NOT_FOUND, "Unable to find user with userId ${params.userId}")

0 commit comments

Comments
 (0)