mirror of
https://github.com/owncast/owncast.git
synced 2024-11-22 12:49:37 +03:00
Return error when data not found in logo upload API
This commit is contained in:
parent
6f97085285
commit
3819335090
1 changed files with 6 additions and 1 deletions
|
@ -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…
Reference in a new issue