feat: implement 'not_started' task status with validation and UI updates
This commit is contained in:
@@ -49,6 +49,14 @@ async function updateProjectTaskStatusHandler(req, { params }) {
|
||||
);
|
||||
}
|
||||
|
||||
const allowedStatuses = ['not_started', 'pending', 'in_progress', 'completed', 'cancelled'];
|
||||
if (!allowedStatuses.includes(status)) {
|
||||
return NextResponse.json(
|
||||
{ error: "Invalid status. Must be one of: " + allowedStatuses.join(', ') },
|
||||
{ status: 400 }
|
||||
);
|
||||
}
|
||||
|
||||
updateProjectTaskStatus(id, status, req.user?.id || null);
|
||||
return NextResponse.json({ success: true });
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user