minor fix
This commit is contained in:
parent
1c1e427efd
commit
7bcf4080f4
1 changed files with 5 additions and 1 deletions
|
@ -43,11 +43,15 @@ public class InfoController {
|
||||||
method = RequestMethod.GET,
|
method = RequestMethod.GET,
|
||||||
produces = MediaType.IMAGE_PNG_VALUE + ";base64")
|
produces = MediaType.IMAGE_PNG_VALUE + ";base64")
|
||||||
public String logo(@PathVariable final String urlSuffix) {
|
public String logo(@PathVariable final String urlSuffix) {
|
||||||
|
if (urlSuffix == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return this.institutionDAO
|
return this.institutionDAO
|
||||||
.all(null, true)
|
.all(null, true)
|
||||||
.getOrThrow()
|
.getOrThrow()
|
||||||
.stream()
|
.stream()
|
||||||
.filter(inst -> urlSuffix.endsWith(inst.urlSuffix))
|
.filter(inst -> inst.urlSuffix != null && urlSuffix.endsWith(inst.urlSuffix))
|
||||||
.findFirst()
|
.findFirst()
|
||||||
.map(inst -> inst.logoImage)
|
.map(inst -> inst.logoImage)
|
||||||
.orElse(null);
|
.orElse(null);
|
||||||
|
|
Loading…
Reference in a new issue