fix: Returns the result in the content api for options getby (#1353)

pull/1375/head
扶醉 2021-04-15 00:57:40 +08:00 committed by GitHub
parent 9ccd19bfc6
commit bec10e9066
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -82,7 +82,7 @@ public class OptionController {
@ApiOperation("Gets option value by option key")
public BaseResponse<Object> getBy(@PathVariable("key") String key) {
Object optionValue = optionFilter.filter(key)
.map(k -> optionService.getByKey(key))
.flatMap(k -> optionService.getByKey(key))
.orElse(null);
return BaseResponse.ok(optionValue);
}