summaryrefslogtreecommitdiffstats
path: root/api4/oauth.go
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2017-05-23 11:06:25 -0400
committerGitHub <noreply@github.com>2017-05-23 11:06:25 -0400
commit5c1049054eace710abd3418bbad141fbb7dd5d7f (patch)
tree24d75c14ce2aae2c6f1a8d5bc7392e958e416666 /api4/oauth.go
parent69f3f2fdce4ae21a037ca61d753279efcc70f0ec (diff)
downloadchat-5c1049054eace710abd3418bbad141fbb7dd5d7f.tar.gz
chat-5c1049054eace710abd3418bbad141fbb7dd5d7f.tar.bz2
chat-5c1049054eace710abd3418bbad141fbb7dd5d7f.zip
PLT-6471 Properly panic when translations can't be loaded (#6414)
* PLT-6471 Properly panic when translations can't be loaded * Print usage messages when errors occur during CLI initialization * Reverted behaviour of FindDir and added second return value to it * Fixed merge conflict
Diffstat (limited to 'api4/oauth.go')
-rw-r--r--api4/oauth.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/api4/oauth.go b/api4/oauth.go
index 626a6065f..402651b92 100644
--- a/api4/oauth.go
+++ b/api4/oauth.go
@@ -323,7 +323,9 @@ func authorizeOAuthPage(c *Context, w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Security-Policy", "frame-ancestors 'self'")
w.Header().Set("Content-Type", "text/html")
w.Header().Set("Cache-Control", "no-cache, max-age=31556926, public")
- http.ServeFile(w, r, utils.FindDir(model.CLIENT_DIR)+"root.html")
+
+ staticDir, _ := utils.FindDir(model.CLIENT_DIR)
+ http.ServeFile(w, r, staticDir+"root.html")
}
func getAccessToken(c *Context, w http.ResponseWriter, r *http.Request) {