fix: some api bug

This commit is contained in:
wwweww
2026-03-31 22:12:06 +08:00
parent c5ff4f0216
commit e7970ac25f
219 changed files with 16195 additions and 2126 deletions
@@ -44,16 +44,16 @@ func (s *UsercenterServer) GetUsersById(ctx context.Context, in *pb.GetUsersById
return l.GetUsersById(in)
}
func (s *UsercenterServer) GetUserByUsername(ctx context.Context, in *pb.GetUserByUsernameReq) (*pb.GetUserByUsernameResp, error) {
l := logic.NewGetUserByUsernameLogic(ctx, s.svcCtx)
return l.GetUserByUsername(in)
}
func (s *UsercenterServer) SearchUsers(ctx context.Context, in *pb.SearchUsersReq) (*pb.SearchUsersResp, error) {
l := logic.NewSearchUsersLogic(ctx, s.svcCtx)
return l.SearchUsers(in)
}
func (s *UsercenterServer) GetUserByUsername(ctx context.Context, in *pb.GetUserByUsernameReq) (*pb.GetUserByUsernameResp, error) {
l := logic.NewGetUserByUsernameLogic(ctx, s.svcCtx)
return l.GetUserByUsername(in)
}
func (s *UsercenterServer) Login(ctx context.Context, in *pb.LoginReq) (*pb.LoginResp, error) {
l := logic.NewLoginLogic(ctx, s.svcCtx)
return l.Login(in)
@@ -83,3 +83,60 @@ func (s *UsercenterServer) ResetPassword(ctx context.Context, in *pb.ResetPasswo
l := logic.NewResetPasswordLogic(ctx, s.svcCtx)
return l.ResetPassword(in)
}
func (s *UsercenterServer) SwitchRole(ctx context.Context, in *pb.SwitchRoleReq) (*pb.SwitchRoleResp, error) {
l := logic.NewSwitchRoleLogic(ctx, s.svcCtx)
return l.SwitchRole(in)
}
// -----------------------userFollows-----------------------
func (s *UsercenterServer) AddUserFollows(ctx context.Context, in *pb.AddUserFollowsReq) (*pb.AddUserFollowsResp, error) {
l := logic.NewAddUserFollowsLogic(ctx, s.svcCtx)
return l.AddUserFollows(in)
}
func (s *UsercenterServer) UpdateUserFollows(ctx context.Context, in *pb.UpdateUserFollowsReq) (*pb.UpdateUserFollowsResp, error) {
l := logic.NewUpdateUserFollowsLogic(ctx, s.svcCtx)
return l.UpdateUserFollows(in)
}
func (s *UsercenterServer) DelUserFollows(ctx context.Context, in *pb.DelUserFollowsReq) (*pb.DelUserFollowsResp, error) {
l := logic.NewDelUserFollowsLogic(ctx, s.svcCtx)
return l.DelUserFollows(in)
}
func (s *UsercenterServer) GetUserFollowsById(ctx context.Context, in *pb.GetUserFollowsByIdReq) (*pb.GetUserFollowsByIdResp, error) {
l := logic.NewGetUserFollowsByIdLogic(ctx, s.svcCtx)
return l.GetUserFollowsById(in)
}
func (s *UsercenterServer) SearchUserFollows(ctx context.Context, in *pb.SearchUserFollowsReq) (*pb.SearchUserFollowsResp, error) {
l := logic.NewSearchUserFollowsLogic(ctx, s.svcCtx)
return l.SearchUserFollows(in)
}
// -----------------------userPreferences-----------------------
func (s *UsercenterServer) AddUserPreferences(ctx context.Context, in *pb.AddUserPreferencesReq) (*pb.AddUserPreferencesResp, error) {
l := logic.NewAddUserPreferencesLogic(ctx, s.svcCtx)
return l.AddUserPreferences(in)
}
func (s *UsercenterServer) UpdateUserPreferences(ctx context.Context, in *pb.UpdateUserPreferencesReq) (*pb.UpdateUserPreferencesResp, error) {
l := logic.NewUpdateUserPreferencesLogic(ctx, s.svcCtx)
return l.UpdateUserPreferences(in)
}
func (s *UsercenterServer) DelUserPreferences(ctx context.Context, in *pb.DelUserPreferencesReq) (*pb.DelUserPreferencesResp, error) {
l := logic.NewDelUserPreferencesLogic(ctx, s.svcCtx)
return l.DelUserPreferences(in)
}
func (s *UsercenterServer) GetUserPreferencesById(ctx context.Context, in *pb.GetUserPreferencesByIdReq) (*pb.GetUserPreferencesByIdResp, error) {
l := logic.NewGetUserPreferencesByIdLogic(ctx, s.svcCtx)
return l.GetUserPreferencesById(in)
}
func (s *UsercenterServer) SearchUserPreferences(ctx context.Context, in *pb.SearchUserPreferencesReq) (*pb.SearchUserPreferencesResp, error) {
l := logic.NewSearchUserPreferencesLogic(ctx, s.svcCtx)
return l.SearchUserPreferences(in)
}