-
Notifications
You must be signed in to change notification settings - Fork 0
Bulk booking #50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bulk booking #50
Changes from all commits
33d9489
94c3b06
70cb299
763391d
62ae227
bca1bc0
6fe9c7d
6a7d9cf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| meta { | ||
| name: BulkBookSlots | ||
| type: http | ||
| seq: 15 | ||
| } | ||
|
|
||
| post { | ||
| url: {{development}}/bookings/bulk/time-range | ||
| body: json | ||
| auth: bearer | ||
| } | ||
|
|
||
| headers { | ||
| Content-Type: application/json | ||
| } | ||
|
|
||
| auth:bearer { | ||
| token: {{token}} | ||
| } | ||
|
|
||
| body:json { | ||
| { | ||
| "fieldId": "{{fieldId}}", | ||
| "startDate": "2026-05-10", | ||
| "endDate": "2026-05-12", | ||
| "startTime": "6:00", | ||
| "endTime": "11:00", | ||
| "userName": "John Doe", | ||
| "phoneNumber": "+9779800000000" | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| meta { | ||
| name: BulkConfirmBookings | ||
| type: http | ||
| seq: 16 | ||
| } | ||
|
|
||
| patch { | ||
| url: {{development}}/bookings/bulk/confirm | ||
| body: json | ||
| auth: bearer | ||
| } | ||
|
|
||
| headers { | ||
| Content-Type: application/json | ||
| } | ||
|
|
||
| auth:bearer { | ||
| token: {{token}} | ||
| } | ||
|
|
||
| body:json { | ||
| { | ||
| "totalAmount": 5000, | ||
| "bookings": [ | ||
| { "slotId": "{{slotId}}" } | ||
| ] | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| meta { | ||
| name: CancelBooking | ||
| type: http | ||
| seq: 15 | ||
| } | ||
|
|
||
| patch { | ||
| url: {{development}}/bookings/{{slotId}}/cancel | ||
| body: none | ||
| auth: bearer | ||
| } | ||
|
|
||
| auth:bearer { | ||
| token: {{token}} | ||
| } | ||
|
|
||
| headers { | ||
| Content-Type: application/json | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| meta { | ||
| name: CancelMembership | ||
| type: http | ||
| seq: 20 | ||
| } | ||
|
|
||
| patch { | ||
| url: {{development}}/membership-plans/{{membershipId}}/cancel | ||
| body: json | ||
| auth: bearer | ||
| } | ||
|
|
||
| auth:bearer { | ||
| token: {{token}} | ||
| } | ||
|
|
||
| headers { | ||
| Content-Type: application/json | ||
| } | ||
|
|
||
| body:json { | ||
| { | ||
| "endDate": "2026-05-20" | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| meta { | ||
| name: UpdateMembership | ||
| type: http | ||
| seq: 7 | ||
| } | ||
|
|
||
| patch { | ||
| url: {{development}}/membership-plans/{{membershipId}} | ||
| body: json | ||
| auth: none | ||
| } | ||
|
|
||
| headers { | ||
| Authorization: Bearer {{token}} | ||
| Content-Type: application/json | ||
|
Comment on lines
+10
to
+15
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Auth mode is inconsistent with the actual request headers. Line 10 sets 🤖 Prompt for AI Agents |
||
| } | ||
|
|
||
| body:json { | ||
| { | ||
| "userName": "Ayush Morning Slot 1", | ||
| "phoneNumber": "9867654567", | ||
| "fieldId": "{{fieldId}}", | ||
| "perSlotPrice": 2000, | ||
| "effectiveFromDate": "2026-05-20", | ||
| "startDate": "2026-05-02", | ||
| "timeRange": [ | ||
| { | ||
| "day": "tuesday", | ||
| "slots": [ | ||
| { | ||
| "startTime": "06:00", | ||
| "endTime": "07:00" | ||
| } | ||
| ] | ||
| } | ||
| ], | ||
| "active": true | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -20,7 +20,7 @@ auth:bearer { | |||||||||
|
|
||||||||||
| body:json { | ||||||||||
| { | ||||||||||
| "requestId": "a9c46cc5-a4fa-462b-b6c0-cce177c422c7", | ||||||||||
| "otp": "817418" | ||||||||||
| "requestId": "dcec5e4b-303c-4fd2-ac10-204f6e872c04", | ||||||||||
| "otp": "160433" | ||||||||||
|
Comment on lines
+23
to
+24
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Description: Search for potential hardcoded credentials in .bru files
# Search for OTP patterns and UUIDs in body sections
rg -n -C2 '"otp":\s*"[0-9]+"' --glob '*.bru'
rg -n -C2 '"requestId":\s*"[a-f0-9-]+"' --glob '*.bru'Repository: hellofutsal/HelloFutsal Length of output: 1511 Replace hardcoded OTP and requestId values with environment variable placeholders across all API documentation. Hardcoded credentials appear in at least two body:json {
{
- "requestId": "dcec5e4b-303c-4fd2-ac10-204f6e872c04",
- "otp": "160433"
+ "requestId": "{{requestId}}",
+ "otp": "{{otp}}"
}
}Define these variables in Bruno environment configuration files rather than in API request definitions. 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||
| } | ||||||||||
| } | ||||||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,12 +1,12 @@ | ||||||
| vars { | ||||||
| development: http://localhost:3000 | ||||||
| fieldId: 3066550b-b4b3-4098-ad5c-8dd25a703fe0 | ||||||
| token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI4MTNlNzNhYi1iYzE1LTQ0ZWUtODgxZC1kMTZiNzQzOWQ5NDQiLCJlbWFpbCI6bnVsbCwibW9iaWxlTnVtYmVyIjoiOTg2Nzc1NDczOCIsInJvbGUiOiJhZG1pbiIsImlhdCI6MTc3Nzg4MDc1NCwiZXhwIjoxNzc3OTY3MTU0fQ.r-zjgdL-KOFvqFl7_bM3jH7qMOSxJU-cGzqYl2VHDB4 | ||||||
| fieldId: 1bdfdb6b-41d8-4e39-a38c-398bdca0ba39 | ||||||
| token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIzMDIyMWFkOS0zZjgyLTQzZDgtYjQ1OS1kZGYyMGY2YzgzOTAiLCJlbWFpbCI6bnVsbCwibW9iaWxlTnVtYmVyIjoiOTg2Nzc1NDczOCIsInJvbGUiOiJhZG1pbiIsImlhdCI6MTc3ODMwMDMyOSwiZXhwIjoxNzc4Mzg2NzI5fQ.GHeUq7DIOmimuj6eBVFtFq6HiFXf9oSQP8RS0pW1sCU | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove committed JWT and rotate it immediately A live token is checked into source. This is a credential exposure and should be replaced with a local placeholder plus secret rotation. Suggested fix- token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
+ token: <SET_LOCALLY_DO_NOT_COMMIT>📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| ruleBookSpecificSlotId: 2e78fc78-08e4-423e-a8ef-5ff10c59f1a7 | ||||||
| ruleBookAllSlotId: 81e212b2-dd86-47db-bb96-8a163b615d61 | ||||||
| ruleBookTimeSlotId: 4aebf2ac-9651-4450-8968-812cd487261e | ||||||
| slotId: 9ab23a63-d756-4708-a984-9d3b7f58e76c | ||||||
| slotId: c7b13c7d-6d73-4e24-941e-d74a8eb18d5f | ||||||
| bookingId: c04ce07f-f1af-4ac2-a854-2f4394b2c565 | ||||||
| scheduleSettingId: c06a9396-8f7f-4158-94d9-59ebd9d0adfd | ||||||
| membershipId: 6d0203b7-fab7-4382-a26c-7402ff217245 | ||||||
| membershipId: 528852ea-9aa7-499f-bb9d-77301c0f8eae | ||||||
| } | ||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use zero-padded
HH:mmin example payloads.On Line 26,
startTimeis"6:00"while most validators/examples expect"06:00"format. Keep both times zero-padded to avoid validation failures when running this request directly.🤖 Prompt for AI Agents