14 lines
283 B
TypeScript
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}`,
|
|
},
|
|
]
|