Skip to content

Commit

Permalink
Suggestion from ATM CR
Browse files Browse the repository at this point in the history
  • Loading branch information
lbwexler committed Oct 11, 2024
1 parent 1008a94 commit 5af00a6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions grails-app/controllers/io/xh/hoist/impl/XhController.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class XhController extends BaseController {
def track() {
ensureClientUsernameMatchesSession()
def payload = parseRequestJSON([safeEncode: true]),
entries = payload.entries != null ? payload.entries as List : Collections.singletonList(payload)
entries = payload.entries as List
trackService.trackAll(entries)
renderJSON(success: true)
}
Expand All @@ -120,10 +120,10 @@ class XhController extends BaseController {
renderJSON(prefService.clientConfig)
}

def setPrefs(String updates) {
def setPrefs() {
ensureClientUsernameMatchesSession()

Map prefs = parseObject(updates)
def prefs = parseRequestJSON()
prefs.each {k, value ->
String key = k.toString()
if (value instanceof Map) {
Expand Down

0 comments on commit 5af00a6

Please sign in to comment.