0xironclad / 0xironclad/Task-Scheduler-API

Implement PATCH /tasks/:id

Open
#21 0 comments 0 reactions 1 assignee Claimed by @0xironclad View on GitHub
api good first issue
Dominant language
TypeScript
Stars
0
Forks
2
PR merge metrics
No merged PRs in 30d

Description

Implement a partial update endpoint for tasks.

What to implement

Route: PATCH /tasks/:id

Allow updating (any subset
```
name
description
run_at
priority
max_retries
status (e.g. pending, canceled)
```

Validate:
```
id is a valid number
run_at is a valid future datetime (for rescheduling)
status is one of the allowed values
```

Return:
```
200 OK with the updated task on success
404 if the task does not exist
400 on invalid input
```

Expected result
Clients can reschedule tasks, tweak metadata, or cancel them without recreating the task.

Contributor guide

No contributing guide indexed for this repository

Research direction

Look for existing task routes in the codebase, likely in a routes or controllers directory. The PATCH endpoint needs to validate the input fields, update the task in the database, and return the updated task. Check the model or service layer for task update logic and validation. Ensure the response matches the specified status codes.

Written by the indexing model from the issue text.

Assessment

Tech stack
express, node.js, postgresql, typescript
Domain
api, backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.