| | |
| | | ctx.Ok() |
| | | } |
| | | |
| | | // SetDeviceConfig |
| | | // Config |
| | | // @Tags 设备 |
| | | // @Summary 设置设备一些配置 |
| | | // @Produce application/json |
| | | // @Param object body request.DeviceConfig true "查询参数" |
| | | // @Success 200 {object} contextx.Response{} "成功" |
| | | // @Router /v1/device/config [post] |
| | | func (slf *DeviceApi) config(c *gin.Context) { |
| | | func (slf *DeviceApi) Config(c *gin.Context) { |
| | | var params request.DeviceConfig |
| | | ctx, ok := contextx.NewContext(c, ¶ms) |
| | | if !ok { |
| | |
| | | { |
| | | deviceGroup.GET("list", deviceApi.DeviceList) // 可选设备列表 |
| | | deviceGroup.POST("setCurrentDeviceId", deviceApi.SetCurrentDeviceId) // 切换设备ID |
| | | deviceGroup.POST("config", deviceApi.Config) // 配置一些字段 |
| | | } |
| | | |
| | | systemApi := new(v1.SystemApi) |