This commit is contained in:
parent
df0ad4adeb
commit
19852d0b6a
|
@ -8,6 +8,7 @@ User = root
|
||||||
Password = jup2000
|
Password = jup2000
|
||||||
Host = 127.0.0.1
|
Host = 127.0.0.1
|
||||||
Database = library2
|
Database = library2
|
||||||
|
ShowQueries = true
|
||||||
|
|
||||||
; First user to be created, on every startup the program checks if he exists, if not it creates it
|
; First user to be created, on every startup the program checks if he exists, if not it creates it
|
||||||
[User]
|
[User]
|
||||||
|
|
|
@ -12,6 +12,7 @@ type ConfigStruct struct {
|
||||||
User string
|
User string
|
||||||
Password string
|
Password string
|
||||||
Database string
|
Database string
|
||||||
|
ShowQueries bool
|
||||||
}
|
}
|
||||||
|
|
||||||
JWTLoginSecret []byte
|
JWTLoginSecret []byte
|
||||||
|
|
|
@ -33,7 +33,7 @@ func SetEngine() (err error) {
|
||||||
x.Sync(&Status{})
|
x.Sync(&Status{})
|
||||||
x.Sync(&Quantity{})
|
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
|
// Check if the first user already exists, aka a user with the ID = 1. If not, insert it
|
||||||
_, exists, err := GetUserByID(1)
|
_, exists, err := GetUserByID(1)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user