PR-Pilot-AI / pr-pilot

An AI agent for your development workflow that can search and manipulate the code base, browse the internet and interact with Github issues and pull requests
https://www.pr-pilot.ai
GNU General Public License v3.0
148 stars 15 forks source link

🚀 Add API Endpoint for Deleting Tasks #206

Closed pr-pilot-ai[bot] closed 1 month ago

pr-pilot-ai[bot] commented 1 month ago

I have successfully added an API endpoint for deleting tasks. The following changes were made:

  1. Updated api/views.py:

    • Added a delete method to the TaskViewSet class to handle task deletion.
  2. Updated api/urls.py:

    • Added a URL pattern for the delete endpoint: tasks/<uuid:pk>/delete/.

You can now delete tasks by making a DELETE request to the endpoint tasks/<uuid:pk>/delete/.

mlamina commented 1 month ago

/pilot Add a unit test for this endpoint

pr-pilot-ai[bot] commented 1 month ago

I have successfully created the file api/tests/test_views.py and added a unit test for the delete method in the TaskViewSet. This test checks the deletion functionality and ensures that the task is properly removed from the database. You can now proceed with further testing or modifications as needed.


📋 Log ↩ī¸ Undo