-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/on delete edit functionality #55
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
Changes from 5 commits
2cd86cf
1483af6
04344cd
c23ff4b
b51d8cb
464f6e7
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: DeleteField | ||
| type: http | ||
| seq: 9 | ||
| } | ||
|
|
||
| delete { | ||
| url: {{development}}/fields/{{fieldId}} | ||
| body: none | ||
| auth: bearer | ||
| } | ||
|
|
||
| headers { | ||
| ~Authorization: Bearer $TOKEN | ||
| } | ||
|
|
||
| auth:bearer { | ||
| token: {{token}} | ||
| } | ||
|
|
||
| docs { | ||
| # Delete Field | ||
|
|
||
| Soft-deletes a field and deactivates its related rule books and membership plans. | ||
|
|
||
| ## Requirements | ||
|
|
||
| - Only admins can delete fields | ||
| - At least one active field must remain for the owner | ||
| - Use a valid `fieldId` | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| meta { | ||
| name: DeleteMembership | ||
| type: http | ||
| seq: 41 | ||
| } | ||
|
|
||
| delete { | ||
| url: {{development}}/membership-plans/{{membershipId}} | ||
| body: none | ||
| auth: bearer | ||
| } | ||
|
|
||
| headers { | ||
| ~Authorization: Bearer $TOKEN | ||
| } | ||
|
|
||
| auth:bearer { | ||
| token: {{token}} | ||
| } | ||
|
|
||
| docs { | ||
| # Delete Membership Plan | ||
|
|
||
| Deletes a membership plan by cancelling it immediately. | ||
|
|
||
| ## Behavior | ||
|
|
||
| - Marks the membership as inactive | ||
| - Sets the end date to today | ||
| - Releases future booked membership slots tied to the plan | ||
|
|
||
| ## Requirements | ||
|
|
||
| - Only admins can delete membership plans | ||
| - Use a valid `membershipId` | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| meta { | ||
| name: DeleteRuleBook | ||
| type: http | ||
| seq: 12 | ||
| } | ||
|
|
||
| delete { | ||
| url: {{development}}/fields/{{fieldId}}/rule-books/{{ruleBookId}} | ||
| body: none | ||
| auth: bearer | ||
| } | ||
|
|
||
| headers { | ||
| ~Authorization: Bearer $TOKEN | ||
| } | ||
|
|
||
| auth:bearer { | ||
| token: {{token}} | ||
| } | ||
|
|
||
| docs { | ||
| # Delete Rule Book | ||
|
|
||
| Soft-deletes a field rule book by marking it inactive. | ||
|
|
||
| ## Requirements | ||
|
|
||
| - The field must belong to the authenticated admin | ||
| - Use valid `fieldId` and `ruleBookId` | ||
| } | ||
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,12 +1,13 @@ | ||||||
| vars { | ||||||
| development: http://localhost:3000 | ||||||
| fieldId: 1bdfdb6b-41d8-4e39-a38c-398bdca0ba39 | ||||||
| token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIzMDIyMWFkOS0zZjgyLTQzZDgtYjQ1OS1kZGYyMGY2YzgzOTAiLCJlbWFpbCI6bnVsbCwibW9iaWxlTnVtYmVyIjoiOTg2Nzc1NDczOCIsInJvbGUiOiJhZG1pbiIsImlhdCI6MTc3ODMwMDMyOSwiZXhwIjoxNzc4Mzg2NzI5fQ.GHeUq7DIOmimuj6eBVFtFq6HiFXf9oSQP8RS0pW1sCU | ||||||
| fieldId: 7e64459c-4a92-490c-bfdd-4ab660a626e9 | ||||||
| token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIzZjljZWYwZi0zZGQ0LTQwOGMtYTI2Ni0wMDJjN2E3MjlhODUiLCJlbWFpbCI6bnVsbCwibW9iaWxlTnVtYmVyIjoiOTg2Nzc1NDczOCIsInJvbGUiOiJhZG1pbiIsImlhdCI6MTc3ODYzNzYxNywiZXhwIjoxNzc4NzI0MDE3fQ.lF51reUEi07ST1GxobnaRq_nQ9vHWKrmRwRx9yryfYU | ||||||
|
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 bearer token from tracked environment file. A real JWT is committed in source control. Even if expired, this is a secrets-handling breach and encourages unsafe reuse. Suggested fix- token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
+ token: YOUR_TOKEN_HERE📝 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: c7b13c7d-6d73-4e24-941e-d74a8eb18d5f | ||||||
| bookingId: c04ce07f-f1af-4ac2-a854-2f4394b2c565 | ||||||
| scheduleSettingId: c06a9396-8f7f-4158-94d9-59ebd9d0adfd | ||||||
| membershipId: 528852ea-9aa7-499f-bb9d-77301c0f8eae | ||||||
| rulebookId: 5d6ca08c-cfad-4273-9656-66b4cdb13262 | ||||||
| } | ||||||
Uh oh!
There was an error while loading. Please reload this page.