|
@@ -289,3 +289,21 @@ func StopCollect(c *gin.Context) {
|
|
|
response.Success("停止采集", "", c)
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
+// Disconnect
|
|
|
+// PingExample confrontation-training
|
|
|
+// @Summary 断开连接
|
|
|
+// @Schemes
|
|
|
+// @Description 断开连接
|
|
|
+// @Tags 设备管理
|
|
|
+// @Accept json
|
|
|
+// @Produce json
|
|
|
+// @Success 200 {string} string "ok"
|
|
|
+// @Router /v1/device/:mac/disconnect [delete]
|
|
|
+func Disconnect(c *gin.Context) {
|
|
|
+ mac := c.Param("mac")
|
|
|
+ disconnectUrl := global.Config.Gateway.BaseUrl + global.Config.Gateway.DisconnectUrl
|
|
|
+ disconnectUrl = strings.Replace(disconnectUrl, "MAC", mac, -1)
|
|
|
+ response.Success("断开连接", mac, c)
|
|
|
+ return
|
|
|
+}
|