Refactor code

pull/131/head
wenxu12345 3 years ago
parent 7903dc7c2e
commit e75e36e999

@ -39,7 +39,7 @@ func main() {
friendRouterGroup.POST("/get_blacklist", friend.GetBlacklist)
friendRouterGroup.POST("/remove_blacklist", friend.RemoveBlacklist)
friendRouterGroup.POST("/delete_friend", friend.DeleteFriend)
friendRouterGroup.POST("/add_friend_response", friend.AddFriendResponse)
friendRouterGroup.POST("/add_friend_response", friend.AddFriendResponse) //1
friendRouterGroup.POST("/set_friend_comment", friend.SetFriendComment)
friendRouterGroup.POST("/is_friend", friend.IsFriend)
friendRouterGroup.POST("/import_friend", friend.ImportFriend)

@ -352,7 +352,7 @@ func GetFriendList(c *gin.Context) {
return
}
req := &rpc.GetFriendListReq{CommID: &rpc.CommID{}}
utils.CopyStructFields(req.CommID, &params.ParamsCommFriend)
utils.CopyStructFields(req.CommID, &params)
var ok bool
ok, req.CommID.OpUserID = token_verify.GetUserIDFromToken(c.Request.Header.Get("token"))
if !ok {

@ -103,7 +103,8 @@ type GetFriendsInfoResp struct {
}
type GetFriendListReq struct {
ParamsCommFriend
OperationID string `json:"operationID" binding:"required"`
FromUserID string `json:"fromUserID" binding:"required"`
}
type GetFriendListResp struct {
CommResp

Loading…
Cancel
Save