feat: 后端初始化
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import type { Context } from '@netlify/functions'
|
||||
import { guardMethod } from '../utils/method.js'
|
||||
import { ok } from '../utils/http.js'
|
||||
import { withErrorBoundary } from '../utils/handler.js'
|
||||
|
||||
export default withErrorBoundary(async (request: Request, _context: Context) => {
|
||||
const methodResponse = guardMethod(request, ['POST'])
|
||||
if (methodResponse) return methodResponse
|
||||
|
||||
return ok({ message: 'order-create endpoint placeholder' })
|
||||
})
|
||||
Reference in New Issue
Block a user