Skip to content

Commit

Permalink
teamToken
Browse files Browse the repository at this point in the history
  • Loading branch information
pratyush3124 committed Mar 14, 2024
1 parent fe44158 commit 0c6b026
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/api/event1/getTeamViaToken/route.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { connectMongoDB } from "@/lib/mongodb";
import { TeamModel } from "@/models/TeamDetails";
import { event1TeamToken } from "@/models/event1TeamToken";
import { NextResponse } from "next/server";


Expand All @@ -8,7 +8,7 @@ export async function POST(req) {
await connectMongoDB();
const { code } = await req.json();
console.log(code);
const team = await TeamModel.findOne({ teamCode: code });
const team = await event1TeamToken.findOne({ teamCode: code });
if (!team) {
return NextResponse.json({ error: "Team not found" });
}
Expand Down
2 changes: 1 addition & 1 deletion app/events/event1/joinTeam/page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ const JoinTeam = ({ teamCode: propTeamCode }) => {
*/

// non react friendly
window.location.href = '/memberDashboard';
window.location.href = '/events/event1/memberDash';

}, 1000);
} else {
Expand Down

0 comments on commit 0c6b026

Please sign in to comment.