Fix empty JSON object on empty lookup results
This commit is contained in:
@@ -81,7 +81,7 @@ class MappingController {
|
|||||||
Optional<SingleLookupReply> lookupOpt = strategy.find(lookupRequest)
|
Optional<SingleLookupReply> lookupOpt = strategy.find(lookupRequest)
|
||||||
if (!lookupOpt.isPresent()) {
|
if (!lookupOpt.isPresent()) {
|
||||||
log.info("No mapping was found, return empty JSON object")
|
log.info("No mapping was found, return empty JSON object")
|
||||||
return JsonOutput.toJson([])
|
return "{}"
|
||||||
}
|
}
|
||||||
|
|
||||||
SingleLookupReply lookup = lookupOpt.get()
|
SingleLookupReply lookup = lookupOpt.get()
|
||||||
|
Reference in New Issue
Block a user