feat: 系统配置界面增加sqlite 配置
This commit is contained in:
@@ -39,7 +39,7 @@ system:
|
||||
use-multipoint: false
|
||||
env: 'public' # Change to "develop" to skip authentication for development mode
|
||||
addr: 8888
|
||||
db: sqlite
|
||||
db-type: sqlite
|
||||
|
||||
# captcha configuration
|
||||
captcha:
|
||||
|
@@ -16,7 +16,7 @@ type System struct {
|
||||
UseMultipoint bool `mapstructure:"use-multipoint" json:"useMultipoint"`
|
||||
Env string `mapstructure:"env" json:"env"`
|
||||
Addr int `mapstructure:"addr" json:"addr"`
|
||||
Db string `mapstructure:"db" json:"db"`
|
||||
DbType string `mapstructure:"db-type" json:"dbType"`
|
||||
}
|
||||
|
||||
type JWT struct {
|
||||
|
BIN
server/db/db.db
BIN
server/db/db.db
Binary file not shown.
@@ -8,7 +8,7 @@ import (
|
||||
)
|
||||
|
||||
func main() {
|
||||
switch global.GVA_CONFIG.System.Db {
|
||||
switch global.GVA_CONFIG.System.DbType {
|
||||
case "mysql":
|
||||
initialize.Mysql()
|
||||
case "sqlite":
|
||||
|
Reference in New Issue
Block a user