默认关闭教程

This commit is contained in:
marvzhang
2020-03-01 10:24:31 +08:00
parent 4a91ee62a9
commit 11defc16c2
13 changed files with 45 additions and 16 deletions

View File

@@ -38,6 +38,7 @@ other:
version: 0.4.7
setting:
allowRegister: "N"
enableTutorial: "N"
notification:
mail:
server: ''

View File

@@ -7,7 +7,8 @@ import (
)
type SettingBody struct {
AllowRegister string `json:"allow_register"`
AllowRegister string `json:"allow_register"`
EnableTutorial string `json:"enable_tutorial"`
}
func GetVersion(c *gin.Context) {
@@ -21,9 +22,10 @@ func GetVersion(c *gin.Context) {
}
func GetSetting(c *gin.Context) {
allowRegister := viper.GetString("setting.allowRegister")
body := SettingBody{AllowRegister: allowRegister}
body := SettingBody{
AllowRegister: viper.GetString("setting.allowRegister"),
EnableTutorial: viper.GetString("setting.enableTutorial"),
}
c.JSON(http.StatusOK, Response{
Status: "ok",