diff --git a/internal/social/service.go b/internal/social/service.go index b68ed97..be1d0d9 100644 --- a/internal/social/service.go +++ b/internal/social/service.go @@ -24,6 +24,9 @@ func (s *SocialService) Follow(ctx context.Context, social *Social) error { if err != nil { return err } + if social.FollowerID == social.VloggerID { + return errors.New("can not follow self") + } isFollowed, err := s.repo.IsFollowed(ctx, social) if err != nil { return err