| | |
| | | |
| | | } |
| | | |
| | | // @Security ApiKeyAuth |
| | | // @Summary 获取本地文件开关设置 |
| | | // @Description 获取本地文件开关设置 |
| | | // @Produce json |
| | |
| | | var api dbapi.FileAnalysisApi |
| | | setting, err := api.GetFileAnalysisSet() |
| | | if err == nil { |
| | | util.ResponseFormat(c,code.Success, setting) |
| | | util.ResponseFormat(c,code.Success, map[string]interface{}{ |
| | | "videoEnable": setting.VideoEnable, |
| | | "fileDirectory": setting.FileDirectory, |
| | | "channelCount": setting.ChannelCount, |
| | | }) |
| | | } else { |
| | | util.ResponseFormat(c,code.ComError, setting) |
| | | } |
| | |
| | | Enable bool `json:"enable"` |
| | | } |
| | | |
| | | // @Security ApiKeyAuth |
| | | // @Summary 切换本地文件分析开关 |
| | | // @Description 切换本地文件分析开关 |
| | | // @Accept json |