diff --git a/app/api/register/[tournamentId]/route.js b/app/api/register/[tournamentId]/route.js index 719e11b..679cbbf 100644 --- a/app/api/register/[tournamentId]/route.js +++ b/app/api/register/[tournamentId]/route.js @@ -3,11 +3,8 @@ import { dbConnect } from '../../../../lib/dbConnect'; import Tournament from '../../../../model/Tournament'; -export default async function handler(req, res) { - if (req.method !== 'POST') { - return res.status(405).json({ error: 'Method Not Allowed' }); - } - +export default async function POST(req, res) { + const { tournamentId, teamName, members, inviteCode } = req.body; if (!tournamentId || !teamName || !members || members.length === 0) { diff --git a/package-lock.json b/package-lock.json index d7f52d5..648bd83 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5992,11 +5992,11 @@ } }, "node_modules/axios": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.3.1.tgz", - "integrity": "sha512-78pWJsQTceInlyaeBQeYZ/QgZeWS8hGeKiIJiDKQe3hEyBb7sEMq0K4gjx+Va6WHTYO4zI/RRl8qGRzn0YMadA==", + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.4.tgz", + "integrity": "sha512-DukmaFRnY6AzAALSH4J2M3k6PkaC+MfaAGdEERRWcC9q3/TWQwLpHR8ZRLKTdQ3aBDL64EdluRDjJqKw+BPZEw==", "dependencies": { - "follow-redirects": "^1.15.0", + "follow-redirects": "^1.15.6", "form-data": "^4.0.0", "proxy-from-env": "^1.1.0" }