0xironclad / 0xironclad/Task-Scheduler-API
Implement PATCH /tasks/:id
- 主要语言
- TypeScript
- 星标
- 0
- 派生
- 2
- PR 合并指标
- 30 天内没有已合并 PR
描述
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.
贡献指南
这个仓库没有索引到贡献指南
调研方向
在代码库中查找现有的任务路由,可能在 routes 或 controllers 目录中。PATCH 端点需要验证输入字段,更新数据库中的任务,并返回更新后的任务。检查模型或服务层中的任务更新逻辑和验证。确保响应符合指定的状态码。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- express, node.js, postgresql, typescript
- 领域
- api, backend
- Issue 类型
- 功能
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 描述清楚
- 新手友好度
- 55/100