mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-23 18:00:32 +08:00
add ParseToken
This commit is contained in:
parent
74cea2b41c
commit
2dab5e4a78
@ -118,7 +118,7 @@ func ParseToken(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
resp := api.ParseTokenResp{CommResp: api.CommResp{ErrCode: 0, ErrMsg: ""}, ExpireTime: expireTime}
|
resp := api.ParseTokenResp{CommResp: api.CommResp{ErrCode: 0, ErrMsg: ""}, ExpireTime: api.ExpireTime{ExpireTimeSeconds: 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)
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,16 @@ type ParseTokenReq struct {
|
|||||||
OperationID string `json:"operationID" binding:"required"`
|
OperationID string `json:"operationID" binding:"required"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//type ParseTokenResp struct {
|
||||||
|
// CommResp
|
||||||
|
// ExpireTime int64 `json:"expireTime" binding:"required"`
|
||||||
|
//}
|
||||||
|
|
||||||
|
type ExpireTime struct {
|
||||||
|
ExpireTimeSeconds int64 `json:"expireTimeSeconds" `
|
||||||
|
}
|
||||||
|
|
||||||
type ParseTokenResp struct {
|
type ParseTokenResp struct {
|
||||||
CommResp
|
CommResp
|
||||||
ExpireTime int64 `json:"expireTime" binding:"required"`
|
ExpireTime ExpireTime `json:"expireTime"`
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user