giovabattelli / FinishLine

Our project management dashboard, v5
https://finishlinebyner.com
GNU Affero General Public License v3.0
0 stars 0 forks source link

[Stats Page] - Create Delete Graph Collection Endpoint #8

Open giovabattelli opened 1 day ago

giovabattelli commented 1 day ago

Description

We need to create an endpoint to soft delete a graph collection. This endpoint should be in the statistics router under the route ‘statistics/:graphCollectionId/delete’ and should take in the graph collection id.

Be sure to include unit tests and screenshots of postman manual tests to ensure everything is working correctly.

Acceptance Criteria

a new endpoint is created in the statistics router under the route ‘statistics/:graphCollectionId/delete’ that soft deletes a graph collection. unit tests and postman screenshot

Proposed Solution

Take a look at some of the other get endpoints we have on Finishline and use it as a reference for this endpoint.

Mocks

No response

trysherpa[bot] commented 1 day ago

Please note, Sherpa may occasionally provide incomplete or inaccurate information. Always verify critical details and double-check suggested changes before implementation.

Summary of the Problem

The issue requires the creation of a new endpoint to soft delete a graph collection within the statistics router of the FinishLine application. The endpoint should be accessible at the route statistics/:graphCollectionId/delete and should accept the graph collection ID as a parameter.

Relevant Files

Suggested Changes

1. src/backend/src/routes/statistics.js

2. src/backend/src/controllers/statisticsController.js

3. src/backend/src/models/GraphCollection.js

Conclusion

To implement the soft delete functionality for the graph collection, you will need to add a new endpoint in the statistics router, create a corresponding controller method to handle the request, and implement the soft delete logic in the model. Make sure to include unit tests for the new endpoint and document the expected behavior in Postman for manual testing. This approach will ensure that the new functionality is integrated seamlessly into the existing architecture of the FinishLine application.