package adminservice

import (
	"context"

	richerror "git.gocasts.ir/ebhomengo/niki/pkg/rich_error"
)

func (s Service) AgentExistByID(ctx context.Context, agentID uint) (bool, error) {
	const op = "adminservice.AgentExistByID"

	exists, err := s.repo.AgentExistByID(ctx, agentID)
	if err != nil {
		return false, richerror.New(op).WithErr(err)
	}

	return exists, nil
}
