feat: 系统配置界面增加sqlite 配置

This commit is contained in:
rikugun
2020-04-12 11:39:16 +08:00
parent 47a45e2d67
commit 71fd0eb9ad
5 changed files with 47 additions and 26 deletions

View File

@@ -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:

View File

@@ -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 {

Binary file not shown.

View File

@@ -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":