| | |
| | | |
| | | } |
| | | |
| | | |
| | | // @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() |
| | |
| | | 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) |