Browse Source

Return error when data not found in logo upload API

pull/2531/head
Gabe Kangas 3 years ago
parent
commit
3819335090
No known key found for this signature in database
GPG Key ID: 4345B2060657F330
  1. 7
      controllers/admin/config.go

7
controllers/admin/config.go

@ -227,7 +227,12 @@ func SetLogo(w http.ResponseWriter, r *http.Request) { @@ -227,7 +227,12 @@ func SetLogo(w http.ResponseWriter, r *http.Request) {
return
}
bytes, extension, err := utils.DecodeBase64Image(configValue.Value.(string))
value, ok := configValue.Value.(string)
if !ok {
controllers.WriteSimpleResponse(w, false, "unable to find image data")
return
}
bytes, extension, err := utils.DecodeBase64Image(value)
if err != nil {
controllers.WriteSimpleResponse(w, false, err.Error())
return

Loading…
Cancel
Save