Description:
When attempting to delete a single benefit from the PMS, all benefits are being deleted instead. This occurs when using the following code snippet:
Code: Select all
for (const benefit of benefitsToDelete) {
await makeApiRequest('DELETE', `/benefits/${benefit.BenefitNum}`);
}
Only the specified benefit(s) in the benefitsToDelete array should be deleted.
Actual Behavior:
All benefits in the system are being deleted, regardless of the contents of benefitsToDelete.
Questions:
1. Is there a cascading delete set up on the backend that might be triggering this behavior?
2. Are there any triggers or constraints in the database that could be causing this issue?
3. Can you provide logs of the DELETE requests being made and the corresponding database operations?
Issue 2: API Filtering Not Working
Description:
When making GET requests to retrieve specific insPlans, patPlans, Insubs, or other entities with query parameters, the API is returning all records instead of filtering based on the provided parameters.
Expected Behavior:
The API should return only the records that match the query parameters provided in the GET request.
Actual Behavior:
All records are being returned, regardless of the filtering parameters specified in the request.
Questions:
1. Is the API correctly parsing and applying the query parameters?
