Conversation
… and introduce a new Get Event By Slug endpoint.
feat: Add `x-vercel-protection-bypass` header to all Postman requests…
new routes
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. ✨ Finishing touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Pull request overview
This PR updates the Postman collection for the OCTACORE API by adding Vercel protection bypass headers to all endpoints, introducing a new event lookup method, fixing an API endpoint URL pattern, and adding a complete new API section for OssomeHacks hackathon management.
- Adds
x-vercel-protection-bypassheaders to all API requests for deployment protection - Introduces "Get Event By Slug" endpoint for slug-based event lookups
- Fixes "Update Event" endpoint URL from
/api/events/editEventto RESTful/api/events/:idpattern - Adds comprehensive "OssomeHacks" API section with 10 endpoints for hackathon registration management
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "name": "Get Stats", | ||
| "request": { | ||
| "method": "GET", | ||
| "header": [ | ||
| { | ||
| "key": "x-vercel-protection-bypass", | ||
| "value": "XXXXXXXXXXX", | ||
| "type": "string", | ||
| "description": "Vercel protection bypass header value" | ||
| } | ||
| ], | ||
| "url": { | ||
| "raw": "{{base_url}}/api/ossomehacks/stats", | ||
| "host": [ | ||
| "{{base_url}}" | ||
| ], | ||
| "path": [ | ||
| "api", | ||
| "ossomehacks", | ||
| "stats" | ||
| ] | ||
| } | ||
| } | ||
| }, |
There was a problem hiding this comment.
The "Get Stats" endpoint is missing a "description" field. Consider adding a description to clarify what statistics are returned (e.g., "Retrieve registration statistics including total registrations, confirmed participants, check-in counts, etc.").
| } | ||
| ] | ||
| } | ||
| } |
There was a problem hiding this comment.
The "Export Registrations" endpoint is missing a "description" field. Consider adding a description to clarify the export format and filtering options (e.g., "Export registrations to CSV format, optionally filtered by status").
| } | |
| }, | |
| "description": "Export registrations to CSV format. You can optionally filter the exported data by status using the 'status' query parameter (e.g., status=confirmed)." |
| "key": "x-vercel-protection-bypass", | ||
| "value": "XXXXXXXXXXX", |
There was a problem hiding this comment.
The hardcoded value "XXXXXXXXXXX" for the x-vercel-protection-bypass header should be replaced with a Postman variable like {{vercel_protection_bypass}}. This would allow users to set the actual value in their environment variables instead of having it hardcoded in every request, making the collection more maintainable and secure.
| { | ||
| "name": "Get Event By Slug", | ||
| "request": { | ||
| "method": "GET", | ||
| "header": [ | ||
| { | ||
| "key": "x-vercel-protection-bypass", | ||
| "value": "XXXXXXXXXXX", | ||
| "type": "string", | ||
| "description": "Vercel protection bypass header value" | ||
| } | ||
| ], | ||
| "url": { | ||
| "raw": "{{base_url}}/api/events/slug/:slug", | ||
| "host": [ | ||
| "{{base_url}}" | ||
| ], | ||
| "path": [ | ||
| "api", | ||
| "events", | ||
| "slug", | ||
| ":slug" | ||
| ], | ||
| "variable": [ | ||
| { | ||
| "key": "slug", | ||
| "value": "intro-to-node", | ||
| "description": "Event slug" | ||
| } | ||
| ] | ||
| }, | ||
| "description": "Fetch event details using the unique slug identifier." | ||
| }, | ||
| "response": [] | ||
| }, |
There was a problem hiding this comment.
The description for the "Get Event By Slug" endpoint is missing from the new request. While other endpoints have descriptions (e.g., line 388 has a description), this endpoint should include a description field at the same level as "name" and "request" to maintain consistency with the collection structure.
| "name": "Get Registration By Email", | ||
| "request": { | ||
| "method": "GET", | ||
| "header": [ | ||
| { | ||
| "key": "x-vercel-protection-bypass", | ||
| "value": "XXXXXXXXXXX", | ||
| "type": "string", | ||
| "description": "Vercel protection bypass header value" | ||
| } | ||
| ], | ||
| "url": { | ||
| "raw": "{{base_url}}/api/ossomehacks/registrations/email/:email", | ||
| "host": [ | ||
| "{{base_url}}" | ||
| ], | ||
| "path": [ | ||
| "api", | ||
| "ossomehacks", | ||
| "registrations", | ||
| "email", | ||
| ":email" | ||
| ], | ||
| "variable": [ | ||
| { | ||
| "key": "email", | ||
| "value": "john@example.com", | ||
| "description": "Participant Email" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| }, |
There was a problem hiding this comment.
The "Get Registration By Email" endpoint is missing a "description" field to maintain consistency with other endpoints in the collection.
| "name": "Register Participant", | ||
| "request": { | ||
| "method": "POST", | ||
| "header": [ | ||
| { | ||
| "key": "Content-Type", | ||
| "value": "application/json" | ||
| }, | ||
| { | ||
| "key": "x-vercel-protection-bypass", | ||
| "value": "XXXXXXXXXXX", | ||
| "type": "string", | ||
| "description": "Vercel protection bypass header value" | ||
| } | ||
| ], | ||
| "body": { | ||
| "mode": "raw", | ||
| "raw": "{\n \"firstName\": \"John\",\n \"lastName\": \"Doe\",\n \"email\": \"john@example.com\",\n \"phoneNumber\": \"+1-555-123-4567\",\n \"age\": 20,\n \"school\": \"MIT\",\n \"levelOfStudy\": \"Undergraduate University (3+ year)\",\n \"countryOfResidence\": \"United States\",\n \"gender\": \"Man\",\n \"mlhCodeOfConductAgreed\": \"true\",\n \"mlhPrivacyPolicyAgreed\": \"true\",\n \"mlhEmailSubscription\": \"true\"\n}" | ||
| }, | ||
| "url": { | ||
| "raw": "{{base_url}}/api/ossomehacks/register", | ||
| "host": [ | ||
| "{{base_url}}" | ||
| ], | ||
| "path": [ | ||
| "api", | ||
| "ossomehacks", | ||
| "register" | ||
| ] | ||
| } | ||
| } | ||
| }, |
There was a problem hiding this comment.
The "Register Participant" endpoint is missing a "description" field. Consider adding a description to document the expected behavior and any prerequisites for registration (e.g., "Register a new participant for OssomeHacks. Requires MLH agreement fields to be set to true").
| "name": "Get All Registrations", | ||
| "request": { | ||
| "method": "GET", | ||
| "header": [ | ||
| { | ||
| "key": "x-vercel-protection-bypass", | ||
| "value": "XXXXXXXXXXX", | ||
| "type": "string", | ||
| "description": "Vercel protection bypass header value" | ||
| } | ||
| ], | ||
| "url": { | ||
| "raw": "{{base_url}}/api/ossomehacks/registrations?status=pending&page=1&limit=50", | ||
| "host": [ | ||
| "{{base_url}}" | ||
| ], | ||
| "path": [ | ||
| "api", | ||
| "ossomehacks", | ||
| "registrations" | ||
| ], | ||
| "query": [ | ||
| { | ||
| "key": "status", | ||
| "value": "pending", | ||
| "description": "Filter by status" | ||
| }, | ||
| { | ||
| "key": "page", | ||
| "value": "1", | ||
| "description": "Page number" | ||
| }, | ||
| { | ||
| "key": "limit", | ||
| "value": "50", | ||
| "description": "Items per page" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| }, |
There was a problem hiding this comment.
The "Get All Registrations" endpoint is missing a "description" field. Consider adding a description to clarify the endpoint's purpose and filtering options (e.g., "Retrieve all OssomeHacks registrations with optional filters for status, pagination support").
| "name": "Get Registration By ID", | ||
| "request": { | ||
| "method": "GET", | ||
| "header": [ | ||
| { | ||
| "key": "x-vercel-protection-bypass", | ||
| "value": "XXXXXXXXXXX", | ||
| "type": "string", | ||
| "description": "Vercel protection bypass header value" | ||
| } | ||
| ], | ||
| "url": { | ||
| "raw": "{{base_url}}/api/ossomehacks/registrations/:id", | ||
| "host": [ | ||
| "{{base_url}}" | ||
| ], | ||
| "path": [ | ||
| "api", | ||
| "ossomehacks", | ||
| "registrations", | ||
| ":id" | ||
| ], | ||
| "variable": [ | ||
| { | ||
| "key": "id", | ||
| "value": "507f1f77bcf86cd799439011", | ||
| "description": "Registration ID" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| }, |
There was a problem hiding this comment.
The "Get Registration By ID" endpoint is missing a "description" field to maintain consistency with other endpoints in the collection.
| "name": "Update Registration", | ||
| "request": { | ||
| "method": "PUT", | ||
| "header": [ | ||
| { | ||
| "key": "Content-Type", | ||
| "value": "application/json" | ||
| }, | ||
| { | ||
| "key": "x-vercel-protection-bypass", | ||
| "value": "XXXXXXXXXXX", | ||
| "type": "string", | ||
| "description": "Vercel protection bypass header value" | ||
| } | ||
| ], | ||
| "body": { | ||
| "mode": "raw", | ||
| "raw": "{\n \"status\": \"confirmed\"\n}" | ||
| }, | ||
| "url": { | ||
| "raw": "{{base_url}}/api/ossomehacks/registrations/:id", | ||
| "host": [ | ||
| "{{base_url}}" | ||
| ], | ||
| "path": [ | ||
| "api", | ||
| "ossomehacks", | ||
| "registrations", | ||
| ":id" | ||
| ], | ||
| "variable": [ | ||
| { | ||
| "key": "id", | ||
| "value": "507f1f77bcf86cd799439011", | ||
| "description": "Registration ID" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| }, |
There was a problem hiding this comment.
The "Update Registration" endpoint is missing a "description" field. Consider adding a description to clarify what fields can be updated (e.g., "Update registration details such as status (pending, confirmed, rejected)").
| "name": "Check-In Participant", | ||
| "request": { | ||
| "method": "POST", | ||
| "header": [ | ||
| { | ||
| "key": "x-vercel-protection-bypass", | ||
| "value": "XXXXXXXXXXX", | ||
| "type": "string", | ||
| "description": "Vercel protection bypass header value" | ||
| } | ||
| ], | ||
| "url": { | ||
| "raw": "{{base_url}}/api/ossomehacks/check-in/:id", | ||
| "host": [ | ||
| "{{base_url}}" | ||
| ], | ||
| "path": [ | ||
| "api", | ||
| "ossomehacks", | ||
| "check-in", | ||
| ":id" | ||
| ], | ||
| "variable": [ | ||
| { | ||
| "key": "id", | ||
| "value": "507f1f77bcf86cd799439011", | ||
| "description": "Registration ID" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
| }, |
There was a problem hiding this comment.
The "Check-In Participant" endpoint is missing a "description" field. Consider adding a description to clarify the check-in process (e.g., "Mark a participant as checked-in at the event").
No description provided.