summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
author=Corey Hulen <corey@hulen.com>2015-09-15 19:09:50 -0700
committer=Corey Hulen <corey@hulen.com>2015-09-15 19:09:50 -0700
commit5e2f701e6c6c8bfa87b2913100365b45264470c3 (patch)
tree6256da99df4c8bb021aea3ede4953593d3e30a38 /api
parentb2a679c25da42c4665059965830858da4f0ec238 (diff)
downloadchat-5e2f701e6c6c8bfa87b2913100365b45264470c3.tar.gz
chat-5e2f701e6c6c8bfa87b2913100365b45264470c3.tar.bz2
chat-5e2f701e6c6c8bfa87b2913100365b45264470c3.zip
Removing old config stuff
Diffstat (limited to 'api')
-rw-r--r--api/api.go1
-rw-r--r--api/config.go34
2 files changed, 0 insertions, 35 deletions
diff --git a/api/api.go b/api/api.go
index 10f3deb82..8203b07a6 100644
--- a/api/api.go
+++ b/api/api.go
@@ -42,7 +42,6 @@ func InitApi() {
InitWebSocket(r)
InitFile(r)
InitCommand(r)
- InitConfig(r)
InitAdmin(r)
templatesDir := utils.FindDir("api/templates")
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)
- }
-}