diff options
author | =Corey Hulen <corey@hulen.com> | 2015-09-29 14:17:16 -0700 |
---|---|---|
committer | =Corey Hulen <corey@hulen.com> | 2015-09-29 14:17:16 -0700 |
commit | 8fadea44debd00c1babd12bff9eb2dd0a5d99370 (patch) | |
tree | 029cf65137b2590308c2d745ef61d7458d3d7287 /store/sql_post_store.go | |
parent | 942702ff1a6cc3763742ea9fec6ecc587d998411 (diff) | |
download | chat-8fadea44debd00c1babd12bff9eb2dd0a5d99370.tar.gz chat-8fadea44debd00c1babd12bff9eb2dd0a5d99370.tar.bz2 chat-8fadea44debd00c1babd12bff9eb2dd0a5d99370.zip |
PLT-404 adding basic error checking to config file.
Diffstat (limited to 'store/sql_post_store.go')
-rw-r--r-- | store/sql_post_store.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/store/sql_post_store.go b/store/sql_post_store.go index 21e8e9d00..668f45fbb 100644 --- a/store/sql_post_store.go +++ b/store/sql_post_store.go @@ -418,7 +418,7 @@ func (s SqlPostStore) Search(teamId string, userId string, terms string, isHasht var posts []*model.Post - if utils.Cfg.SqlSettings.DriverName == "postgres" { + if utils.Cfg.SqlSettings.DriverName == model.DATABASE_DRIVER_POSTGRES { // Parse text for wildcards if wildcard, err := regexp.Compile("\\*($| )"); err == nil { @@ -451,7 +451,7 @@ func (s SqlPostStore) Search(teamId string, userId string, terms string, isHasht result.Err = model.NewAppError("SqlPostStore.Search", "We encounted an error while searching for posts", "teamId="+teamId+", err="+err.Error()) } - } else if utils.Cfg.SqlSettings.DriverName == "mysql" { + } else if utils.Cfg.SqlSettings.DriverName == model.DATABASE_DRIVER_MYSQL { searchQuery := fmt.Sprintf(`SELECT * FROM |