mirror of
https://github.com/OwethuManagedServices/oms-website-nextjs.git
synced 2025-12-17 18:58:10 +00:00
feature: intergrated directus for posts
This commit is contained in:
8
lib/query/home.ts
Normal file
8
lib/query/home.ts
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user