package repository

import "go.mongodb.org/mongo-driver/bson/primitive"

func objectIDs(ids []string) []primitive.ObjectID {
	out := make([]primitive.ObjectID, 0, len(ids))
	for _, id := range ids {
		objectID, err := primitive.ObjectIDFromHex(id)
		if err == nil {
			out = append(out, objectID)
		}
	}
	return out
}
