summaryrefslogtreecommitdiffstats
path: root/api4/brand.go
diff options
context:
space:
mode:
Diffstat (limited to 'api4/brand.go')
-rw-r--r--api4/brand.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/api4/brand.go b/api4/brand.go
index 2e3081353..b6d353a29 100644
--- a/api4/brand.go
+++ b/api4/brand.go
@@ -19,13 +19,15 @@ func (api *API) InitBrand() {
func getBrandImage(c *Context, w http.ResponseWriter, r *http.Request) {
// No permission check required
- if img, err := c.App.GetBrandImage(); err != nil {
+ img, err := c.App.GetBrandImage()
+ if err != nil {
w.WriteHeader(http.StatusNotFound)
w.Write(nil)
- } else {
- w.Header().Set("Content-Type", "image/png")
- w.Write(img)
+ return
}
+
+ w.Header().Set("Content-Type", "image/png")
+ w.Write(img)
}
func uploadBrandImage(c *Context, w http.ResponseWriter, r *http.Request) {