diff options
author | Chris <ccbrown112@gmail.com> | 2017-10-26 14:21:22 -0500 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2017-10-26 15:21:22 -0400 |
commit | 7ed011745a544873f40f806f1803cb8a4998ba01 (patch) | |
tree | fe13919b050b33c8dd3f6ca5fce6ad1980b2dd3e /api4/saml.go | |
parent | a0bfd2885d03e3f9fb6b3cdd6ba60eea93c848b2 (diff) | |
download | chat-7ed011745a544873f40f806f1803cb8a4998ba01.tar.gz chat-7ed011745a544873f40f806f1803cb8a4998ba01.tar.bz2 chat-7ed011745a544873f40f806f1803cb8a4998ba01.zip |
Remove more global refs / state (#7723)
* remove more global refs / state
* fix job enterprise initialization
* fix api4 test compilation
* saml api endpoints fix
Diffstat (limited to 'api4/saml.go')
-rw-r--r-- | api4/saml.go | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/api4/saml.go b/api4/saml.go index ba9ee9eec..b2f2b3eef 100644 --- a/api4/saml.go +++ b/api4/saml.go @@ -8,7 +8,6 @@ import ( "net/http" l4g "github.com/alecthomas/log4go" - "github.com/mattermost/mattermost-server/app" "github.com/mattermost/mattermost-server/model" "github.com/mattermost/mattermost-server/utils" ) @@ -73,7 +72,7 @@ func addSamlPublicCertificate(c *Context, w http.ResponseWriter, r *http.Request return } - if err := app.AddSamlPublicCertificate(fileData); err != nil { + if err := c.App.AddSamlPublicCertificate(fileData); err != nil { c.Err = err return } @@ -92,7 +91,7 @@ func addSamlPrivateCertificate(c *Context, w http.ResponseWriter, r *http.Reques return } - if err := app.AddSamlPrivateCertificate(fileData); err != nil { + if err := c.App.AddSamlPrivateCertificate(fileData); err != nil { c.Err = err return } @@ -111,7 +110,7 @@ func addSamlIdpCertificate(c *Context, w http.ResponseWriter, r *http.Request) { return } - if err := app.AddSamlIdpCertificate(fileData); err != nil { + if err := c.App.AddSamlIdpCertificate(fileData); err != nil { c.Err = err return } @@ -124,7 +123,7 @@ func removeSamlPublicCertificate(c *Context, w http.ResponseWriter, r *http.Requ return } - if err := app.RemoveSamlPublicCertificate(); err != nil { + if err := c.App.RemoveSamlPublicCertificate(); err != nil { c.Err = err return } @@ -138,7 +137,7 @@ func removeSamlPrivateCertificate(c *Context, w http.ResponseWriter, r *http.Req return } - if err := app.RemoveSamlPrivateCertificate(); err != nil { + if err := c.App.RemoveSamlPrivateCertificate(); err != nil { c.Err = err return } @@ -152,7 +151,7 @@ func removeSamlIdpCertificate(c *Context, w http.ResponseWriter, r *http.Request return } - if err := app.RemoveSamlIdpCertificate(); err != nil { + if err := c.App.RemoveSamlIdpCertificate(); err != nil { c.Err = err return } @@ -166,6 +165,6 @@ func getSamlCertificateStatus(c *Context, w http.ResponseWriter, r *http.Request return } - status := app.GetSamlCertificateStatus() + status := c.App.GetSamlCertificateStatus() w.Write([]byte(status.ToJson())) } |