File size: 250 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
export default (req, res) => {
  if (
    process.env.CUSTOM_SERVER &&
    typeof req.fromCustomServer === 'undefined'
  ) {
    throw new Error('missing custom req field')
  }

  if (req.method === 'POST') {
    res.status(200).json(req.body)
  }
}