talawa-api
talawa-api copied to clipboard
Create reusable utility for agenda folder validation
trafficstars
Background
Currently, agenda folder validation logic is duplicated across different mutations. This includes checking if:
- The folder exists
- The folder belongs to the correct event
- The folder is compatible with agenda items
Proposal
Create a reusable utility function to centralize this validation logic, making the code more maintainable and reducing duplication.
References
- Discussion in PR #3216
Notes
- This improvement was initially considered during PR #3216 but was deferred to maintain PR focus
- Implementation details will be discussed in the PR that addresses this issue
/cc @shivasankaran18