✨
This commit is contained in:
1 parent
9e70d7b16f
commit
1b3f5328b0
5 files changed
+15
-8
No files matched your search
@@ -10,8 +10,11 @@ export default async function updtateGift(req: NextApiRequest, res: NextApiRespo
|
||||
const session = await getSession({ req })
|
||||
const { gain } = req.body;
|
||||
|
||||
console.log(req.method);
|
||||
|
||||
|
||||
// est-ce la méthode est un POST ou PUT?
|
||||
if (req.method !== ("POST" || 'PUT')) {
|
||||
if (!(['POST', 'PUT'].indexOf(req.method) > -1)) {
|
||||
throw new Error(
|
||||
`The HTTP ${req.method} method is not supported at this route.`
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user