import directus from "./directus";
import { readItems } from "@directus/sdk";

export const reviews = await directus.request(
    readItems("codyops_reviews", {
        fields: ['*', 'user_created.*']
        }
    )
);

export function getReviewsCourse(course: any) {
    return reviews.filter((review: any) => review.course_id === course);
};
