fix
liuxiaolong
2019-12-03 379dcbe019f9283f8dc594f582b61523ec458989
controllers/fileAnalysisSetting.go
@@ -11,7 +11,13 @@
}
// @Summary 获取本地文件开关设置
// @Description 获取本地文件开关设置
// @Produce json
// @Tags 本地文件
// @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}"
// @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}"
// @Router /data/api-v/fileSetting/show [get]
func (fsc FileAnalysisSettingController) Show(c *gin.Context) {
   var api dbapi.FileAnalysisApi
   setting, err := api.GetFileAnalysisSet()
@@ -26,6 +32,15 @@
   Enable bool    `json:"enable"`
}
// @Summary 切换本地文件分析开关
// @Description 切换本地文件分析开关
// @Accept json
// @Produce json
// @Tags 本地文件
// @Param reqBody body controllers.EnableSet true "开关"
// @Success 200 {string} json "{"code":200, success:true, msg:"", data:""}"
// @Failure 500 {string} json "{"code":500, success:false, msg:"",data:""}"
// @Router /data/api-v/fileSetting/changeEnable [post]
func (fsc FileAnalysisSettingController) ChangeEnable(c *gin.Context) {
   var reqBody EnableSet
   c.BindJSON(&reqBody)