summaryrefslogtreecommitdiffstats
path: root/web/web.go
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2015-11-17 16:57:04 -0800
committerCorey Hulen <corey@hulen.com>2015-11-17 16:57:04 -0800
commit2ed93f74021020bd72675a47dae9d4e622b27226 (patch)
treef873512533e26512d8fd776116f15066b0b9b699 /web/web.go
parent178e30ecededae61eb727f30919b30358590e7f5 (diff)
parente9a8bcd727e1bfbd98dc1955d1c574b76e9a4ad1 (diff)
downloadchat-2ed93f74021020bd72675a47dae9d4e622b27226.tar.gz
chat-2ed93f74021020bd72675a47dae9d4e622b27226.tar.bz2
chat-2ed93f74021020bd72675a47dae9d4e622b27226.zip
Merge pull request #1403 from florianorben/PLT-327
PLT-327: Add help text for Markdown
Diffstat (limited to 'web/web.go')
-rw-r--r--web/web.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/web/web.go b/web/web.go
index 02ceb69ba..477bd8b27 100644
--- a/web/web.go
+++ b/web/web.go
@@ -80,6 +80,8 @@ func InitWeb() {
mainrouter.Handle("/hooks/{id:[A-Za-z0-9]+}", api.ApiAppHandler(incomingWebhook)).Methods("POST")
+ mainrouter.Handle("/docs/{doc:[A-Za-z0-9]+}", api.AppHandlerIndependent(docs)).Methods("GET")
+
// ----------------------------------------------------------------------------------------------
// *ANYTHING* team specific should go below this line
// ----------------------------------------------------------------------------------------------
@@ -494,6 +496,15 @@ func findTeam(c *api.Context, w http.ResponseWriter, r *http.Request) {
page.Render(c, w)
}
+func docs(c *api.Context, w http.ResponseWriter, r *http.Request) {
+ params := mux.Vars(r)
+ doc := params["doc"]
+
+ page := NewHtmlTemplatePage("docs", "Documentation")
+ page.Props["Site"] = doc
+ page.Render(c, w)
+}
+
func resetPassword(c *api.Context, w http.ResponseWriter, r *http.Request) {
isResetLink := true
hash := r.URL.Query().Get("h")