mirror of https://github.com/mindoc-org/mindoc.git
pull/25/merge
parent
9afeaf70f9
commit
0fc6fbdc9c
|
@ -52,14 +52,18 @@ func RegisterModel() {
|
||||||
|
|
||||||
func Initialization() {
|
func Initialization() {
|
||||||
|
|
||||||
options := []models.Option {
|
(&models.Option{
|
||||||
{ OptionName: "ENABLED_CAPTCHA", OptionValue: "false", OptionTitle:"是否启用验证码"},
|
OptionName: "ENABLED_CAPTCHA", OptionValue: "false", OptionTitle:"是否启用验证码",
|
||||||
{ OptionName: "ENABLED_REGISTER",OptionValue:"false",OptionTitle:"是否启用注册"},
|
}).InsertOrUpdate()
|
||||||
{ OptionName: "ENABLE_ANONYMOUS" , OptionValue:"false", OptionTitle:"启用匿名访问"},
|
(&models.Option{
|
||||||
{ OptionName: "SITE_NAME", OptionValue:"MinDoc", OptionTitle: "站点名称"},
|
OptionName: "ENABLED_REGISTER",OptionValue:"false",OptionTitle:"是否启用注册",
|
||||||
}
|
}).InsertOrUpdate()
|
||||||
|
(&models.Option{
|
||||||
models.NewOption().InsertMulti(options...)
|
OptionName: "ENABLE_ANONYMOUS" , OptionValue:"false", OptionTitle:"启用匿名访问",
|
||||||
|
}).InsertOrUpdate()
|
||||||
|
(&models.Option{
|
||||||
|
OptionName: "SITE_NAME", OptionValue:"MinDoc", OptionTitle: "站点名称",
|
||||||
|
}).InsertOrUpdate()
|
||||||
|
|
||||||
member := models.NewMember()
|
member := models.NewMember()
|
||||||
member.Account = "admin"
|
member.Account = "admin"
|
||||||
|
|
Loading…
Reference in New Issue