Skip to content

fix: event creation and update property name mismatch#161

Merged
rotarymars merged 2 commits into
mainfrom
fix/issue-160-event-creation-fail
Apr 10, 2026
Merged

fix: event creation and update property name mismatch#161
rotarymars merged 2 commits into
mainfrom
fix/issue-160-event-creation-fail

Conversation

@rotarymars
Copy link
Copy Markdown
Member

@rotarymars rotarymars commented Apr 9, 2026

This PR fixes issue #160 where event creation and updates were failing due to a mismatch between frontend property names and backend API expectations.

Changes:

  • Switched from snake_case (event_date, event_time) to camelCase (eventDate, eventTime) in EventFormRequest types and frontend request payloads.
  • This aligns the frontend with the backend API (src/app/api/events/route.ts and src/app/api/events/[id]/route.ts).

Closes #160

Summary by CodeRabbit

  • Refactor
    • Updated event form API request field naming conventions to use camelCase formatting standards. This change affects all date and time field submissions across both event creation and editing workflows within the event management interface, ensuring consistent naming format across all event-related API operations, request payloads, and data submissions throughout the system.

This change aligns the frontend request payload with the backend API by
switching from snake_case (event_date, event_time) to camelCase
(eventDate, eventTime). This fixes the validation error that prevented
event creation and updates.
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
kss-it-committee-github-io Ready Ready Preview, Comment Apr 10, 2026 4:12am

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 9, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4fa74a17-dead-4ae9-9d56-02fdae41baae

📥 Commits

Reviewing files that changed from the base of the PR and between 38556da and 18abc25.

📒 Files selected for processing (3)
  • src/app/events/[id]/edit/EditEventClient.tsx
  • src/app/events/create/EventCreateClient.tsx
  • src/types/api.ts

📝 Walkthrough

Walkthrough

This PR updates field naming conventions in the event management flow from snake_case to camelCase. Changes affect the type definitions (EventFormRequest in api.ts), event creation payload (EventCreateClient.tsx), and event editing payload (EditEventClient.tsx) to ensure consistent camelCase formatting across the request/response contract.

Changes

Cohort / File(s) Summary
Field naming convention update
src/types/api.ts, src/app/events/create/EventCreateClient.tsx, src/app/events/[id]/edit/EditEventClient.tsx
Renamed event_date and event_time fields to camelCase (eventDate, eventTime) across type definition and request payloads to align with API contract expectations.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Suggested labels

enhancement

Suggested reviewers

  • katsumata68
  • SakaYq4875
  • hatuna-827

Poem

🐰 A naming quest, oh what a delight,
Snake_case whispers fade to camelCase bright,
Events now flow with consistent grace,
Fields aligned in their rightful place! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: fixing property name mismatches (snake_case to camelCase) in event creation and update functionality.
Linked Issues check ✅ Passed The PR directly addresses issue #160 by fixing the property name mismatch (event_date/event_time to eventDate/eventTime) that caused event creation failures due to backend validation.
Out of Scope Changes check ✅ Passed All changes are scoped to fixing the property name mismatch in the event creation and update types and payloads, with no unrelated modifications present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/issue-160-event-creation-fail

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes event create/update failures caused by a request payload naming mismatch between the frontend and the events API.

Changes:

  • Updated EventFormRequest (and derived CreateEventRequest / UpdateEventRequest) to use eventDate / eventTime.
  • Updated event create and edit clients to send eventDate / eventTime in JSON payloads.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/types/api.ts Aligns event form request types to the API’s expected camelCase fields (eventDate, eventTime).
src/app/events/create/EventCreateClient.tsx Sends camelCase event date/time fields in the create-event POST payload.
src/app/events/[id]/edit/EditEventClient.tsx Sends camelCase event date/time fields in the update-event PATCH payload.

@rotarymars
Copy link
Copy Markdown
Member Author

I need this quickly, merging….

@rotarymars rotarymars merged commit e70d688 into main Apr 10, 2026
19 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.

[Bug] Can’t create a event

5 participants