Skip to content

Commit cdeccf6

Browse files
author
Adam Collins
committed
#482 fix qid encoding issue
1 parent c79b843 commit cdeccf6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

grails-app/controllers/au/org/ala/spatial/portal/PortalController.groovy

+3-3
Original file line numberDiff line numberDiff line change
@@ -490,16 +490,16 @@ class PortalController {
490490
json.wkt = getWkt(json?.wkt)
491491
}
492492

493-
def r = hubWebService.postUrl("${json.bs}/webportal/params", json)
493+
def r = webService.post("${json.bs}/webportal/params", null, json, ContentType.TEXT_PLAIN, false, false)
494494

495495
if (r.statusCode >= 400) {
496496
log.error("Couldn't post $json to ${json.bs}/webportal/params, status code ${r.statusCode}, body: ${new String(r.text ?: "")}")
497497
def result = ['error': "${r.statusCode} when calling ${json.bs}"]
498498
render result as JSON, status: 500
499499
} else {
500-
value = [qid: new String(r.text)] as JSON
500+
value = [qid: new String(r.resp)] as JSON
501501

502-
if (r?.text) {
502+
if (r?.resp) {
503503
grailsCacheManager.getCache(portalService.caches.QID).put(json, value.toString())
504504
}
505505

0 commit comments

Comments
 (0)