Skip to content

WV-4288: Add options to Edit or Delete individual Tasks#151

Open
soumiyarao wants to merge 1 commit into
wevote:developfrom
soumiyarao:WV-4288
Open

WV-4288: Add options to Edit or Delete individual Tasks#151
soumiyarao wants to merge 1 commit into
wevote:developfrom
soumiyarao:WV-4288

Conversation

@soumiyarao
Copy link
Copy Markdown

What github.com/wevote/weconnect/issues does this fix?

WV-4288: Add options to Edit or Delete individual Tasks

Changes included this pull request?

  • New API Endpoint: Task Delete
    • Added taskDelete controller in taskApiController.js
    • Endpoint: GET /apis/v1/task-delete
    • Accepts personId and taskDefinitionId via query params
    • Calls deleteTask() service to remove the task record from DB
    • Returns structured response indicating deletion status and success/failure
  • Database Layer Update
    • Added deleteTask(personId, taskDefinitionId) in models/taskModel.js
    • Uses Prisma composite key (taskDefinitionIdPersonId) to safely delete a single task record
  • Routing Updates
    • Registered new route in routes/apiRoutes.js:
      • /apis/v1/task-delete → taskDelete controller

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant