add strapi

This commit is contained in:
nicwands
2026-05-29 16:25:36 -04:00
parent 920a2452dd
commit ef70a0c756
5 changed files with 338 additions and 2 deletions

11
libs/strapi.js Normal file
View File

@@ -0,0 +1,11 @@
import { strapi } from '@strapi/client'
export const strapiClient = strapi({
baseURL: 'https://cms.takerofnotes.com/api',
auth: import.meta.env.VITE_STRAPI_API_TOKEN,
})
export const getGlobal = async () => {
const globalManager = strapiClient.single('global')
return await globalManager.find()
}