add strapi
This commit is contained in:
11
libs/strapi.js
Normal file
11
libs/strapi.js
Normal 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()
|
||||
}
|
||||
Reference in New Issue
Block a user