package policiesdb

import (
	"context"

	"github.com/tech/sendico/pkg/db/repository"
	"github.com/tech/sendico/pkg/model"
	"github.com/tech/sendico/pkg/mservice"
)

func (db *PoliciesDB) GetBuiltInPolicy(ctx context.Context, resourceType mservice.Type, policy *model.PolicyDescription) error {
	return db.FindOne(ctx, repository.Filter("resourceTypes", resourceType), policy)
}
