Fix empty JSON object on empty lookup results

This commit is contained in:
Maxime Dor
2017-09-24 21:12:49 +02:00
parent e0022e549e
commit f1e78af80b

View File

@@ -81,7 +81,7 @@ class MappingController {
Optional<SingleLookupReply> lookupOpt = strategy.find(lookupRequest)
if (!lookupOpt.isPresent()) {
log.info("No mapping was found, return empty JSON object")
return JsonOutput.toJson([])
return "{}"
}
SingleLookupReply lookup = lookupOpt.get()