package controller import ( "github.com/gin-gonic/gin" "iot_manager_service/app/middleware" "iot_manager_service/app/security/service" "iot_manager_service/util" "net/http" ) // Security 安防 var Security = new(securityCtl) type securityCtl struct{} func (c *securityCtl) GetCameraLiveList(ctx *gin.Context) { value, _ := ctx.Get(middleware.Authorization) claims := value.(*middleware.Claims) list, err := service.SecurityService.GetCameraLiveList(claims.TenantId) if err != nil { ctx.JSON(http.StatusOK, err) return } ctx.JSON(http.StatusOK, util.SuccessResponse(util.Success, list)) }