Return error when data not found in logo upload API
This commit is contained in:
parent
6f97085285
commit
3819335090
@ -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…
x
Reference in New Issue
Block a user