mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-08-19 19:29:52 +08:00
fix code
This commit is contained in:
parent
d5b873b70b
commit
9aa7ba77f5
@ -87,7 +87,7 @@ type GetInvitationCodesReq struct {
|
||||
|
||||
type GetInvitationCodesResp struct {
|
||||
apiStruct.Pagination
|
||||
codes []InvitationCode
|
||||
Codes []InvitationCode `json:"codes"`
|
||||
}
|
||||
|
||||
func GetInvitationCodes(c *gin.Context) {
|
||||
@ -106,7 +106,15 @@ func GetInvitationCodes(c *gin.Context) {
|
||||
}
|
||||
resp.Pagination.PageNumber = req.PageNumber
|
||||
resp.Pagination.ShowNumber = req.ShowNumber
|
||||
utils.CopyStructFields(codes, resp.codes)
|
||||
for _, v := range codes {
|
||||
resp.Codes = append(resp.Codes, InvitationCode{
|
||||
InvitationCode: v.InvitationCode,
|
||||
CreateTime: v.CreateTime,
|
||||
UserID: v.UserID,
|
||||
LastTime: v.LastTime,
|
||||
Status: v.Status,
|
||||
})
|
||||
}
|
||||
log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp:", resp)
|
||||
c.JSON(http.StatusOK, gin.H{"errCode": 0, "errMsg": "", "data": resp})
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user