Move SAML endpoints out of api package (#8780)

Этот коммит содержится в:
Joram Wilander
2018-05-14 11:27:30 -04:00
коммит произвёл GitHub
родитель 47250c6629
Коммит 6a9aa855d1
5 изменённых файлов: 159 добавлений и 136 удалений

Просмотреть файл

@@ -32,6 +32,7 @@ func NewWeb(a *app.App, root *mux.Router) *Web {
web.InitStatic()
web.InitWebhooks()
web.InitSaml()
return web
}
@@ -71,3 +72,9 @@ func Handle404(a *app.App, w http.ResponseWriter, r *http.Request) {
func IsApiCall(r *http.Request) bool {
return strings.Index(r.URL.Path, "/api/") == 0
}
func ReturnStatusOK(w http.ResponseWriter) {
m := make(map[string]string)
m[model.STATUS] = model.STATUS_OK
w.Write([]byte(model.MapToJson(m)))
}