mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
add ParseToken
This commit is contained in:
parent
872f70a418
commit
7ad555a41b
@ -10,6 +10,7 @@ import (
|
||||
open_im_sdk "Open_IM/pkg/proto/sdk_ws"
|
||||
"Open_IM/pkg/utils"
|
||||
"context"
|
||||
"github.com/fatih/structs"
|
||||
"github.com/gin-gonic/gin"
|
||||
"net/http"
|
||||
"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.Data = structs.Map(&resp.ExpireTime)
|
||||
log.NewInfo(params.OperationID, "ParseToken return ", resp)
|
||||
c.JSON(http.StatusOK, resp)
|
||||
}
|
||||
|
@ -53,5 +53,6 @@ type ExpireTime struct {
|
||||
|
||||
type ParseTokenResp struct {
|
||||
CommResp
|
||||
ExpireTime ExpireTime `json:"expireTime"`
|
||||
Data map[string]interface{} `json:"data"`
|
||||
ExpireTime ExpireTime `json:"-"`
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user