Skip to content

fix(events): add missing organizerId to response and fix incomplete test mocks causing 500 crashes#632

Merged
Harxhit merged 5 commits into
Dev-Card:mainfrom
yachikadev:fix/606-event-test-mocks
Jun 23, 2026
Merged

fix(events): add missing organizerId to response and fix incomplete test mocks causing 500 crashes#632
Harxhit merged 5 commits into
Dev-Card:mainfrom
yachikadev:fix/606-event-test-mocks

Conversation

@yachikadev

Copy link
Copy Markdown
Contributor

Summary

Fixes two pre-existing bugs found while working on #554.
Confirmed via git stash that both issues predate any auth-cleanup changes.

Changes

  • event.ts — added missing organizerId to GET /api/events/:slug response
  • event.test.ts — fixed incomplete mocks:
    • Added organizer: { username, displayName } to slug route mocks
    • Added _count: { attendees: N } to attendees route mocks (was causing 500 crashes in 6 tests)

Test Results

  • tsc --noEmit — 0 errors
  • eslint — 0 errors, 0 warnings
  • Tests — 69/69 passed

Closes #606

@vercel

vercel Bot commented Jun 21, 2026

Copy link
Copy Markdown

@yachikadev is attempting to deploy a commit to the Prashantkumar Khatri's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions

Copy link
Copy Markdown

Hi @yachikadev,

Thanks for opening this pull request.

This PR has been automatically classified based on the files modified.

Applied Labels

  • gssoc:approved
  • backend

Primary Review Area

  • backend

Reviewer

@Harxhit has been identified as the primary reviewer for this pull request.

If you have any questions regarding the affected area or implementation details, feel free to reach out to the assigned reviewer.

Thank you for your contribution!

@github-actions github-actions Bot added the gssoc:approved Required label for every approved PR. Gives the base +50 points and enables contribution tracking. label Jun 21, 2026
@github-actions

github-actions Bot commented Jun 21, 2026

Copy link
Copy Markdown

CI — All Checks Passed

Backend — PASS

Check Result
Lint PASS
Test PASS
Typecheck PASS

Mobile — SKIP

Check Result
Lint -
Test -

Web — SKIP

Check Result
Build -

Last updated: Mon, 22 Jun 2026 11:14:23 GMT

@yachikadev yachikadev force-pushed the fix/606-event-test-mocks branch from b3a8cd7 to 890f25e Compare June 22, 2026 11:09
Signed-off-by: Yachika Sharma <shakuntalaramphalsharma@gmail.com>
@yachikadev

Copy link
Copy Markdown
Contributor Author

@Harxhit All CI checks are passing now. Could you please review when you get a chance?

@Harxhit Harxhit left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM. Approving

@Harxhit Harxhit merged commit 4d74b67 into Dev-Card:main Jun 23, 2026
5 of 6 checks passed
@github-actions

Copy link
Copy Markdown

Congratulations @yachikadev on getting PR #632 merged!

Thank you for your contribution to the project.

To receive the appropriate GSSoC labels and recognition, please mention @Harxhit in the #get-labels channel on our Discord server and share your merged PR link.

ShantKhatri pushed a commit to ShantKhatri/DevCard that referenced this pull request Jun 23, 2026
…est mocks causing 500 crashes (Dev-Card#632)

* fix(events): add organizerId to EventDetails response

* fix(events): fix import order and add missing organizer fields in event test

* fix(event.test.ts): fix makeAttendeeRow return type annotation

* fix(event.test.ts): use type import for LightMyRequestResponse

Signed-off-by: Yachika Sharma <shakuntalaramphalsharma@gmail.com>

---------

Signed-off-by: Yachika Sharma <shakuntalaramphalsharma@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend gssoc:approved Required label for every approved PR. Gives the base +50 points and enables contribution tracking.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(events): GET /api/events/:slug missing organizerId + incomplete test mocks causing 500s

2 participants