mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
Because tsc doesn't infer string literal types in JS files --------- Co-authored-by: JJ Kasper <[email protected]>
14 lines
245 B
TypeScript
14 lines
245 B
TypeScript
import { NextApiRequest, NextApiResponse } from 'next'
|
|
|
|
export const config = {
|
|
api: {
|
|
bodyParser: {
|
|
sizeLimit: '5mb',
|
|
},
|
|
},
|
|
}
|
|
|
|
export default (req: NextApiRequest, res: NextApiResponse) => {
|
|
res.status(200).json(req.body)
|
|
}
|