From 8010bd94f7c5da0f3d0bf5c780376598b7e4e50f Mon Sep 17 00:00:00 2001 From: pluto <2631223275@qq.com> Date: Fri, 11 Aug 2023 17:11:37 +0800 Subject: [PATCH] update note --- internal/api/user.go | 4 ++-- internal/rpc/user/user.go | 6 +++--- pkg/common/db/unrelation/user.go | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/internal/api/user.go b/internal/api/user.go index e4c918b0b..59d293231 100644 --- a/internal/api/user.go +++ b/internal/api/user.go @@ -196,12 +196,12 @@ func (u *UserApi) UnSubscriberStatus(c *gin.Context) { a2r.Call(user.UserClient.SubscribeOrCancelUsersStatus, u.Client, c) } -// GetUserStatus Get the online status of the user +// GetUserStatus Get the online status of the user. func (u *UserApi) GetUserStatus(c *gin.Context) { a2r.Call(user.UserClient.GetUserStatus, u.Client, c) } -// GetSubscribeUsersStatus Get the online status of subscribers +// GetSubscribeUsersStatus Get the online status of subscribers. func (u *UserApi) GetSubscribeUsersStatus(c *gin.Context) { a2r.Call(user.UserClient.GetSubscribeUsersStatus, u.Client, c) } diff --git a/internal/rpc/user/user.go b/internal/rpc/user/user.go index dbb43b44f..a16a16bb2 100644 --- a/internal/rpc/user/user.go +++ b/internal/rpc/user/user.go @@ -274,7 +274,7 @@ func (s *userServer) SubscribeOrCancelUsersStatus(ctx context.Context, req *pbus return &pbuser.SubscribeOrCancelUsersStatusResp{}, nil } -// GetUserStatus Get the online status of the user +// GetUserStatus Get the online status of the user. func (s *userServer) GetUserStatus(ctx context.Context, req *pbuser.GetUserStatusReq) (resp *pbuser.GetUserStatusResp, err error) { onlineStatusList, err := s.UserDatabase.GetUserStatus(ctx, req.UserIDs) if err != nil { @@ -283,7 +283,7 @@ func (s *userServer) GetUserStatus(ctx context.Context, req *pbuser.GetUserStatu return &pbuser.GetUserStatusResp{StatusList: onlineStatusList}, nil } -// SetUserStatus Synchronize user's online status +// SetUserStatus Synchronize user's online status. func (s *userServer) SetUserStatus(ctx context.Context, req *pbuser.SetUserStatusReq) (resp *pbuser.SetUserStatusResp, err error) { err = s.UserDatabase.SetUserStatus(ctx, req.StatusList) if err != nil { @@ -307,7 +307,7 @@ func (s *userServer) SetUserStatus(ctx context.Context, req *pbuser.SetUserStatu return &pbuser.SetUserStatusResp{}, nil } -// GetSubscribeUsersStatus Get the online status of subscribers +// GetSubscribeUsersStatus Get the online status of subscribers. func (s *userServer) GetSubscribeUsersStatus(ctx context.Context, req *pbuser.GetSubscribeUsersStatusReq) (*pbuser.GetSubscribeUsersStatusResp, error) { userList, err := s.UserDatabase.GetAllSubscribeList(ctx, req.UserID) if err != nil { diff --git a/pkg/common/db/unrelation/user.go b/pkg/common/db/unrelation/user.go index 3faec873f..12b61b384 100644 --- a/pkg/common/db/unrelation/user.go +++ b/pkg/common/db/unrelation/user.go @@ -155,7 +155,7 @@ func (u *UserMongoDriver) RemoveSubscribedListFromUser(ctx context.Context, user return errs.Wrap(err) } -// GetAllSubscribeList Get all users subscribed by this user +// GetAllSubscribeList Get all users subscribed by this user. func (u *UserMongoDriver) GetAllSubscribeList(ctx context.Context, userID string) (userIDList []string, err error) { var user unrelation.UserModel cursor := u.userCollection.FindOne( @@ -168,7 +168,7 @@ func (u *UserMongoDriver) GetAllSubscribeList(ctx context.Context, userID string return user.UserIDList, nil } -// GetSubscribedList Get the user subscribed by those users +// GetSubscribedList Get the user subscribed by those users. func (u *UserMongoDriver) GetSubscribedList(ctx context.Context, userID string) (userIDList []string, err error) { var user unrelation.UserModel cursor := u.userCollection.FindOne(