Move API to /comment
This commit is contained in:
parent
cfe7ee49ec
commit
dc4638d9ed
|
@ -13,12 +13,6 @@ export default async function route(req: NextApiRequest, res: NextApiResponse) {
|
||||||
origin: [CORS_ORIGIN_MANIFOLD, CORS_ORIGIN_LOCALHOST],
|
origin: [CORS_ORIGIN_MANIFOLD, CORS_ORIGIN_LOCALHOST],
|
||||||
methods: 'POST',
|
methods: 'POST',
|
||||||
})
|
})
|
||||||
|
|
||||||
const { id } = req.query
|
|
||||||
const contractId = id as string
|
|
||||||
|
|
||||||
if (req.body) req.body.contractId = contractId
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const backendRes = await fetchBackend(req, 'createcomment')
|
const backendRes = await fetchBackend(req, 'createcomment')
|
||||||
await forwardResponse(res, backendRes)
|
await forwardResponse(res, backendRes)
|
Loading…
Reference in New Issue
Block a user