fix: nextjs version

This commit is contained in:
archer
2023-06-16 00:03:52 +08:00
parent 33ffd9d7dd
commit bc2504832f
3 changed files with 156 additions and 115 deletions

View File

@@ -75,13 +75,14 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
amount: (payOrder.price / PRICE_SCALE) * inviter.promotion.rate * 0.01
});
}
jsonRes(res, {
unlockTask(userId);
return jsonRes(res, {
data: '支付成功'
});
unlockTask(userId);
}
} catch (error) {
console.log(error);
// roll back status
try {
await Pay.findByIdAndUpdate(payId, {
status: 'NOTPAY'