feature: intergrated directus for posts

This commit is contained in:
libertyoms
2025-04-26 19:27:16 +02:00
parent 08965c3830
commit 809f5c6ff7
11 changed files with 530 additions and 95 deletions

8
lib/query/home.ts Normal file
View File

@ -0,0 +1,8 @@
import { readItems } from "@directus/sdk";
import { directus } from "../directus";
import { HeroSection } from "@/types";
export async function getHome() {
// Assuming '1' is the primary key for the singleton "home" item
return directus.request(readItems("home")) as unknown as HeroSection;
}