0xironclad / 0xironclad/Task-Scheduler-API

Implement PATCH /tasks/:id

未關閉
#21 0 則留言 0 個 reaction 已指派 1 人 已被 @0xironclad 認領 在 GitHub 檢視
api good first issue
主要語言
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

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。