Skip to content

Closing registrations for ideathon - #58

Merged
Akshat-Raj merged 2 commits into
Genesis-ISE-DSCE:mainfrom
Akshat-Raj:cr
Apr 15, 2026
Merged

Closing registrations for ideathon#58
Akshat-Raj merged 2 commits into
Genesis-ISE-DSCE:mainfrom
Akshat-Raj:cr

Conversation

@Akshat-Raj

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings April 15, 2026 04:50
@vercel

vercel Bot commented Apr 15, 2026

Copy link
Copy Markdown

@Akshat-Raj is attempting to deploy a commit to the Genesis' projects Team on Vercel.

A member of the Team first needs to authorize it.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the site to reflect that Ideathon registrations are closed (alongside Clash Royale), affecting the hero banner copy, the registration page event list, and the registration API guardrail.

Changes:

  • Update Hero banner text to announce Clash Royale + Ideathon registrations are closed.
  • Hide Ideathon from the registration page’s event list.
  • Add a server-side block in the /api/register endpoint intended to reject closed-event registrations.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/components/sections/Hero.tsx Updates on-site messaging to announce closures.
src/app/register/page.tsx Removes Ideathon from selectable registration events (commented out entry).
src/app/api/register/route.ts Adds a server-side “registrations closed” check (currently incorrect for Ideathon).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/app/api/register/route.ts Outdated
Comment on lines 50 to 51
if (event === "clash_royale" || event === "Ideathon") {
return NextResponse.json({ error: "Registrations for Clash Royale are closed." }, { status: 400 });

Copilot AI Apr 15, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The API is checking event === "Ideathon", but the registration payload sends the event ID (e.g. "pitch_perfect" for Ideathon per EVENT_NAMES / formConstants). This means Ideathon registrations are not actually blocked server-side. Update this condition to check the correct event ID ("pitch_perfect") and adjust the error message to reflect whichever event is closed (Clash Royale vs Ideathon).

Suggested change
if (event === "clash_royale" || event === "Ideathon") {
return NextResponse.json({ error: "Registrations for Clash Royale are closed." }, { status: 400 });
const closedEventNames: Record<string, string> = {
clash_royale: "Clash Royale",
pitch_perfect: EVENT_NAMES.pitch_perfect,
};
if (event in closedEventNames) {
return NextResponse.json(
{ error: `Registrations for ${closedEventNames[event]} are closed.` },
{ status: 400 }
);

Copilot uses AI. Check for mistakes.
@Akshat-Raj
Akshat-Raj merged commit cf0c0bf into Genesis-ISE-DSCE:main Apr 15, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants