summaryrefslogtreecommitdiffstats
path: root/app/brand.go
diff options
context:
space:
mode:
Diffstat (limited to 'app/brand.go')
-rw-r--r--app/brand.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/app/brand.go b/app/brand.go
index a2feac7ec..6c1091fff 100644
--- a/app/brand.go
+++ b/app/brand.go
@@ -77,3 +77,19 @@ func (a *App) GetBrandImage() ([]byte, *model.AppError) {
return img, nil
}
+
+func (a *App) DeleteBrandImage() *model.AppError {
+ filePath := BRAND_FILE_PATH + BRAND_FILE_NAME
+
+ fileExists, err := a.FileExists(filePath)
+
+ if err != nil {
+ return err
+ }
+
+ if !fileExists {
+ return model.NewAppError("DeleteBrandImage", "api.admin.delete_brand_image.storage.not_found", nil, "", http.StatusNotFound)
+ }
+
+ return a.RemoveFile(filePath)
+}