shareQuery 和 shareAccept 的响应中加入 model 字段
This commit is contained in:
+2
-2
@@ -499,7 +499,7 @@ const docTemplate = `{
|
|||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "成功返回 eq_data",
|
"description": "成功返回 eq_data、model",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"additionalProperties": true
|
"additionalProperties": true
|
||||||
@@ -647,7 +647,7 @@ const docTemplate = `{
|
|||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "成功返回 eq_data、expire_at",
|
"description": "成功返回 eq_data、expire_at、model",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"additionalProperties": true
|
"additionalProperties": true
|
||||||
|
|||||||
+2
-2
@@ -492,7 +492,7 @@
|
|||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "成功返回 eq_data",
|
"description": "成功返回 eq_data、model",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"additionalProperties": true
|
"additionalProperties": true
|
||||||
@@ -640,7 +640,7 @@
|
|||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "成功返回 eq_data、expire_at",
|
"description": "成功返回 eq_data、expire_at、model",
|
||||||
"schema": {
|
"schema": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"additionalProperties": true
|
"additionalProperties": true
|
||||||
|
|||||||
+2
-2
@@ -326,7 +326,7 @@ paths:
|
|||||||
- application/json
|
- application/json
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: 成功返回 eq_data
|
description: 成功返回 eq_data、model
|
||||||
schema:
|
schema:
|
||||||
additionalProperties: true
|
additionalProperties: true
|
||||||
type: object
|
type: object
|
||||||
@@ -427,7 +427,7 @@ paths:
|
|||||||
- application/json
|
- application/json
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: 成功返回 eq_data、expire_at
|
description: 成功返回 eq_data、expire_at、model
|
||||||
schema:
|
schema:
|
||||||
additionalProperties: true
|
additionalProperties: true
|
||||||
type: object
|
type: object
|
||||||
|
|||||||
@@ -183,7 +183,7 @@ func (h *ShareCodeHandler) ListShareCodesByMac(c *gin.Context) {
|
|||||||
// @Tags ShareCode
|
// @Tags ShareCode
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param shareCode query string true "5 位分享码"
|
// @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 400 {object} map[string]any "参数校验失败"
|
||||||
// @Failure 500 {object} map[string]any "系统错误"
|
// @Failure 500 {object} map[string]any "系统错误"
|
||||||
// @Router /audio/shareQuery [get]
|
// @Router /audio/shareQuery [get]
|
||||||
@@ -206,6 +206,7 @@ func (h *ShareCodeHandler) QueryShareCode(c *gin.Context) {
|
|||||||
"msg": "操作成功",
|
"msg": "操作成功",
|
||||||
"eq_data": eqData,
|
"eq_data": eqData,
|
||||||
"expire_at": data.ExpireAt.Format("2006-01-02 15:04:05"),
|
"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 mac query string true "设备 MAC 地址"
|
||||||
// @Param model query string true "操作设备型号,取值 Luxsin-X9 或 Luxsin-X8"
|
// @Param model query string true "操作设备型号,取值 Luxsin-X9 或 Luxsin-X8"
|
||||||
// @Param shareCode query string true "5 位分享码"
|
// @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 400 {object} map[string]any "参数校验失败"
|
||||||
// @Failure 500 {object} map[string]any "系统错误"
|
// @Failure 500 {object} map[string]any "系统错误"
|
||||||
// @Router /audio/shareAccept [get]
|
// @Router /audio/shareAccept [get]
|
||||||
@@ -273,6 +274,7 @@ func (h *ShareCodeHandler) ImportShareCode(c *gin.Context) {
|
|||||||
"code": 200,
|
"code": 200,
|
||||||
"msg": "操作成功",
|
"msg": "操作成功",
|
||||||
"eq_data": eqData,
|
"eq_data": eqData,
|
||||||
|
"model": data.Model,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user