Files
payload/test/endpoints/endpoints/globals.ts
2024-07-11 15:27:01 -04:00

14 lines
283 B
TypeScript

import type { GlobalConfig } from 'payload'
import { globalEndpoint } from '../shared.js'
export const globalEndpoints: GlobalConfig['endpoints'] = [
{
handler: (req) => {
return Response.json(req.body)
},
method: 'post',
path: `/${globalEndpoint}`,
},
]