summaryrefslogtreecommitdiffstats
path: root/api/config.go
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2015-09-16 12:52:50 -0400
committerChristopher Speller <crspeller@gmail.com>2015-09-16 12:52:50 -0400
commit7e418714bce067172e527359f391943459b3bd48 (patch)
treefb06d542eddb5ce8d63fce27bfe87f6c9c63adbb /api/config.go
parent9828d84f01147ffb87b372d20681f91325ecfcf0 (diff)
parent4e3896d7b1911b8c184dee3c650461f0d3c0acea (diff)
downloadchat-7e418714bce067172e527359f391943459b3bd48.tar.gz
chat-7e418714bce067172e527359f391943459b3bd48.tar.bz2
chat-7e418714bce067172e527359f391943459b3bd48.zip
Merge pull request #687 from mattermost/PLT-93
PLT-93 Cleaning up client side configs
Diffstat (limited to 'api/config.go')
-rw-r--r--api/config.go34
1 files changed, 0 insertions, 34 deletions
diff --git a/api/config.go b/api/config.go
deleted file mode 100644
index 142d1ca66..000000000
--- a/api/config.go
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved.
-// See License.txt for license information.
-
-package api
-
-import (
- l4g "code.google.com/p/log4go"
- "encoding/json"
- "github.com/gorilla/mux"
- "github.com/mattermost/platform/model"
- "github.com/mattermost/platform/utils"
- "net/http"
- "strconv"
-)
-
-func InitConfig(r *mux.Router) {
- l4g.Debug("Initializing config api routes")
-
- sr := r.PathPrefix("/config").Subrouter()
- sr.Handle("/get_all", ApiAppHandler(getConfig)).Methods("GET")
-}
-
-func getConfig(c *Context, w http.ResponseWriter, r *http.Request) {
- settings := make(map[string]string)
-
- settings["ByPassEmail"] = strconv.FormatBool(utils.Cfg.EmailSettings.ByPassEmail)
-
- if bytes, err := json.Marshal(settings); err != nil {
- c.Err = model.NewAppError("getConfig", "Unable to marshall configuration data", err.Error())
- return
- } else {
- w.Write(bytes)
- }
-}