mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-29 18:00:51 +01:00
默认关闭教程
This commit is contained in:
@@ -38,6 +38,7 @@ other:
|
||||
version: 0.4.7
|
||||
setting:
|
||||
allowRegister: "N"
|
||||
enableTutorial: "N"
|
||||
notification:
|
||||
mail:
|
||||
server: ''
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user