diff --git a/docs/docs.go b/docs/docs.go index 896d93a..e78a526 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -499,7 +499,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "成功返回 eq_data", + "description": "成功返回 eq_data、model", "schema": { "type": "object", "additionalProperties": true @@ -647,7 +647,7 @@ const docTemplate = `{ ], "responses": { "200": { - "description": "成功返回 eq_data、expire_at", + "description": "成功返回 eq_data、expire_at、model", "schema": { "type": "object", "additionalProperties": true diff --git a/docs/swagger.json b/docs/swagger.json index 60fdafe..78045d3 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -492,7 +492,7 @@ ], "responses": { "200": { - "description": "成功返回 eq_data", + "description": "成功返回 eq_data、model", "schema": { "type": "object", "additionalProperties": true @@ -640,7 +640,7 @@ ], "responses": { "200": { - "description": "成功返回 eq_data、expire_at", + "description": "成功返回 eq_data、expire_at、model", "schema": { "type": "object", "additionalProperties": true diff --git a/docs/swagger.yaml b/docs/swagger.yaml index dc79703..4f2176c 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -326,7 +326,7 @@ paths: - application/json responses: "200": - description: 成功返回 eq_data + description: 成功返回 eq_data、model schema: additionalProperties: true type: object @@ -427,7 +427,7 @@ paths: - application/json responses: "200": - description: 成功返回 eq_data、expire_at + description: 成功返回 eq_data、expire_at、model schema: additionalProperties: true type: object diff --git a/internal/handler/share_code.go b/internal/handler/share_code.go index c3acb31..0eed3b4 100644 --- a/internal/handler/share_code.go +++ b/internal/handler/share_code.go @@ -183,7 +183,7 @@ func (h *ShareCodeHandler) ListShareCodesByMac(c *gin.Context) { // @Tags ShareCode // @Produce json // @Param shareCode query string true "5 位分享码" -// @Success 200 {object} map[string]any "成功返回 eq_data、expire_at" +// @Success 200 {object} map[string]any "成功返回 eq_data、expire_at、model" // @Failure 400 {object} map[string]any "参数校验失败" // @Failure 500 {object} map[string]any "系统错误" // @Router /audio/shareQuery [get] @@ -206,6 +206,7 @@ func (h *ShareCodeHandler) QueryShareCode(c *gin.Context) { "msg": "操作成功", "eq_data": eqData, "expire_at": data.ExpireAt.Format("2006-01-02 15:04:05"), + "model": data.Model, }) } @@ -218,7 +219,7 @@ func (h *ShareCodeHandler) QueryShareCode(c *gin.Context) { // @Param mac query string true "设备 MAC 地址" // @Param model query string true "操作设备型号,取值 Luxsin-X9 或 Luxsin-X8" // @Param shareCode query string true "5 位分享码" -// @Success 200 {object} map[string]any "成功返回 eq_data" +// @Success 200 {object} map[string]any "成功返回 eq_data、model" // @Failure 400 {object} map[string]any "参数校验失败" // @Failure 500 {object} map[string]any "系统错误" // @Router /audio/shareAccept [get] @@ -273,6 +274,7 @@ func (h *ShareCodeHandler) ImportShareCode(c *gin.Context) { "code": 200, "msg": "操作成功", "eq_data": eqData, + "model": data.Model, }) }