Merge branch 'tuoyun' of github.com:OpenIMSDK/Open-IM-Server into tuoyun

pull/232/head
wangchuxiao 3 years ago
commit 00b58068dc

@ -10,6 +10,7 @@ import (
open_im_sdk "Open_IM/pkg/proto/sdk_ws" open_im_sdk "Open_IM/pkg/proto/sdk_ws"
"Open_IM/pkg/utils" "Open_IM/pkg/utils"
"context" "context"
"github.com/fatih/structs"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"net/http" "net/http"
"strings" "strings"
@ -119,6 +120,7 @@ func ParseToken(c *gin.Context) {
} }
resp := api.ParseTokenResp{CommResp: api.CommResp{ErrCode: 0, ErrMsg: ""}, ExpireTime: api.ExpireTime{ExpireTimeSeconds: uint32(expireTime)}} resp := api.ParseTokenResp{CommResp: api.CommResp{ErrCode: 0, ErrMsg: ""}, ExpireTime: api.ExpireTime{ExpireTimeSeconds: uint32(expireTime)}}
resp.Data = structs.Map(&resp.ExpireTime)
log.NewInfo(params.OperationID, "ParseToken return ", resp) log.NewInfo(params.OperationID, "ParseToken return ", resp)
c.JSON(http.StatusOK, resp) c.JSON(http.StatusOK, resp)
} }

@ -53,5 +53,6 @@ type ExpireTime struct {
type ParseTokenResp struct { type ParseTokenResp struct {
CommResp CommResp
ExpireTime ExpireTime `json:"expireTime"` Data map[string]interface{} `json:"data"`
ExpireTime ExpireTime `json:"-"`
} }

Loading…
Cancel
Save