mirror of
https://github.com/mudabbir-ahmad/peworkshop.git
synced 2026-10-07 19:50:20 +00:00
issues regarding the map and hunt stopping have been fixed. leaderboard page needs to be integrated and a clues should be added to be properly processed. after that the css for the application should be developed.
This commit is contained in:
1 parent
c79a9636a7
commit
e7ad53643c
12 files changed
+855
-187
No files matched your search
@@ -14,11 +14,10 @@ export async function GET(request, context) {
|
||||
if (!token) {
|
||||
return Response.json({ error: "Unauthorized" }, { status: 401 });
|
||||
}
|
||||
// Use token.teamId for validation
|
||||
if (
|
||||
!token.teamId ||
|
||||
parseInt(token.teamId, 10) !== parseInt(context.params.teamId, 10)
|
||||
) {
|
||||
// Await context.params so its properties can be safely used
|
||||
const { teamId } = await context.params;
|
||||
// Validate that the token's teamId matches the requested teamId
|
||||
if (!token.teamId || parseInt(token.teamId, 10) !== parseInt(teamId, 10)) {
|
||||
return Response.json(
|
||||
{ error: "Not authorized to view this team" },
|
||||
{ status: 403 }
|
||||
|
||||
Reference in new issue
Block a user