mirror of
https://github.com/writefreely/writefreely
synced 2024-11-24 17:43:05 +00:00
Only check for username and password if driver type is mysql
This commit is contained in:
parent
bf7d422039
commit
3722c6ba79
1 changed files with 1 additions and 1 deletions
2
app.go
2
app.go
|
@ -370,7 +370,7 @@ func Serve() {
|
|||
app.formDecoder.RegisterConverter(sql.NullFloat64{}, converter.ConvertSQLNullFloat64)
|
||||
|
||||
// Check database configuration
|
||||
if app.cfg.Database.User == "" || app.cfg.Database.Password == "" {
|
||||
if app.cfg.Database.Type == "mysql" && (app.cfg.Database.User == "" || app.cfg.Database.Password == "") {
|
||||
log.Error("Database user or password not set.")
|
||||
os.Exit(1)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue