From 651dd33b29b7b8b296cc5a12479684fa836867b1 Mon Sep 17 00:00:00 2001 From: Saturnino Abril Date: Thu, 31 Aug 2017 01:54:16 +0800 Subject: set to default value with config is missing (#7320) --- api/emoji.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'api/emoji.go') diff --git a/api/emoji.go b/api/emoji.go index 337cfe6f5..296e3afa3 100644 --- a/api/emoji.go +++ b/api/emoji.go @@ -59,7 +59,7 @@ func createEmoji(c *Context, w http.ResponseWriter, r *http.Request) { return } - if len(utils.Cfg.FileSettings.DriverName) == 0 { + if len(*utils.Cfg.FileSettings.DriverName) == 0 { c.Err = model.NewLocAppError("createEmoji", "api.emoji.storage.app_error", nil, "") c.Err.StatusCode = http.StatusNotImplemented return @@ -137,7 +137,7 @@ func deleteEmoji(c *Context, w http.ResponseWriter, r *http.Request) { return } - if len(utils.Cfg.FileSettings.DriverName) == 0 { + if len(*utils.Cfg.FileSettings.DriverName) == 0 { c.Err = model.NewLocAppError("deleteImage", "api.emoji.storage.app_error", nil, "") c.Err.StatusCode = http.StatusNotImplemented return @@ -179,7 +179,7 @@ func getEmojiImage(c *Context, w http.ResponseWriter, r *http.Request) { return } - if len(utils.Cfg.FileSettings.DriverName) == 0 { + if len(*utils.Cfg.FileSettings.DriverName) == 0 { c.Err = model.NewLocAppError("getEmojiImage", "api.emoji.storage.app_error", nil, "") c.Err.StatusCode = http.StatusNotImplemented return -- cgit v1.2.3-1-g7c22