Skip to content

Commit

Permalink
#600 biocache-service userproperties response format
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Collins committed May 9, 2024
1 parent 1dc4025 commit 5381f7c
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,13 @@ class UserDataService {
url = grailsApplication.config.getProperty('biocache.baseUrl') + '/user/property'
}
if (url) {
def resp = webService.get( url + "?alaId=${userId}&name=${URLEncoder.encode(grailsApplication.config.getProperty('info.app.name') + '.' + type, "UTF-8")}")
def resp = webService.get( url + "?alaId=${userId}&name=${URLEncoder.encode(grailsApplication.config.getProperty('info.app.name') + '.' + type, "UTF-8")}", [:], ContentType.APPLICATION_JSON, true, false)

if (resp?.resp && resp?.resp[0]?.value && resp?.resp[0]?.value) {
data = JSON.parse(resp?.resp[0]?.value)
} else if (resp?.resp) {
// for the new format
data = resp?.resp
}
}
} catch (err) {
Expand Down

0 comments on commit 5381f7c

Please sign in to comment.