diff options
author | Chris <ccbrown112@gmail.com> | 2017-10-09 10:16:14 -0700 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2017-10-09 13:16:14 -0400 |
commit | 0f66b6e72621842467d0e368b95ee58f485d4ace (patch) | |
tree | 444f9210a151cb735fe0502d4bb47c324592c0e6 /store/sqlstore/oauth_store.go | |
parent | 70e5f00241473c27a3008959ce08832c75e76ba8 (diff) | |
download | chat-0f66b6e72621842467d0e368b95ee58f485d4ace.tar.gz chat-0f66b6e72621842467d0e368b95ee58f485d4ace.tar.bz2 chat-0f66b6e72621842467d0e368b95ee58f485d4ace.zip |
store/sqlstore cleanup and postgres tests (#7595)
* sqlstore cleanup / postgres tests
* remove stopped containers
* cmd/platform compile fix
* remove test-postgres target from makefile
Diffstat (limited to 'store/sqlstore/oauth_store.go')
-rw-r--r-- | store/sqlstore/oauth_store.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/store/sqlstore/oauth_store.go b/store/sqlstore/oauth_store.go index 7644ac5dc..30a44b75f 100644 --- a/store/sqlstore/oauth_store.go +++ b/store/sqlstore/oauth_store.go @@ -10,7 +10,6 @@ import ( "github.com/mattermost/gorp" "github.com/mattermost/mattermost-server/model" "github.com/mattermost/mattermost-server/store" - "github.com/mattermost/mattermost-server/utils" ) type SqlOAuthStore struct { @@ -336,9 +335,9 @@ func (as SqlOAuthStore) deleteOAuthAppSessions(transaction *gorp.Transaction, cl result := store.StoreResult{} query := "" - if *utils.Cfg.SqlSettings.DriverName == model.DATABASE_DRIVER_POSTGRES { + if as.DriverName() == model.DATABASE_DRIVER_POSTGRES { query = "DELETE FROM Sessions s USING OAuthAccessData o WHERE o.Token = s.Token AND o.ClientId = :Id" - } else if *utils.Cfg.SqlSettings.DriverName == model.DATABASE_DRIVER_MYSQL { + } else if as.DriverName() == model.DATABASE_DRIVER_MYSQL { query = "DELETE s.* FROM Sessions s INNER JOIN OAuthAccessData o ON o.Token = s.Token WHERE o.ClientId = :Id" } |