Moved show sql query setting to config
the build was successful
Details
the build was successful
Details
This commit is contained in:
parent
df0ad4adeb
commit
19852d0b6a
|
@ -8,6 +8,7 @@ User = root
|
|||
Password = jup2000
|
||||
Host = 127.0.0.1
|
||||
Database = library2
|
||||
ShowQueries = true
|
||||
|
||||
; First user to be created, on every startup the program checks if he exists, if not it creates it
|
||||
[User]
|
||||
|
|
|
@ -8,14 +8,15 @@ import (
|
|||
// ConfigStruct holds the config struct
|
||||
type ConfigStruct struct {
|
||||
Database struct {
|
||||
Host string
|
||||
User string
|
||||
Password string
|
||||
Database string
|
||||
Host string
|
||||
User string
|
||||
Password string
|
||||
Database string
|
||||
ShowQueries bool
|
||||
}
|
||||
|
||||
JWTLoginSecret []byte
|
||||
Interface string
|
||||
Interface string
|
||||
|
||||
FirstUser User `ini:"User"`
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ func SetEngine() (err error) {
|
|||
x.Sync(&Status{})
|
||||
x.Sync(&Quantity{})
|
||||
|
||||
x.ShowSQL(true)
|
||||
x.ShowSQL(Config.Database.ShowQueries)
|
||||
|
||||
// Check if the first user already exists, aka a user with the ID = 1. If not, insert it
|
||||
_, exists, err := GetUserByID(1)
|
||||
|
|
Loading…
Reference in New Issue