We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d0b848c commit cbbe399Copy full SHA for cbbe399
apps/api/src/task/controllers/update-task.ts
@@ -45,7 +45,7 @@ async function updateTask(
45
});
46
}
47
48
- return updatedTask;
+ return existingTask;
49
50
51
export default updateTask;
apps/api/src/task/index.ts
@@ -112,6 +112,19 @@ const task = new Hono<{
112
userId,
113
);
114
115
+ if(status !== task.status) {
116
+ const user = c.get("userId");
117
+ await publishEvent("task.status_changed", {
118
+ taskId: task.id,
119
+ userId: user,
120
+ oldStatus: task.status,
121
+ newStatus: status,
122
+ title: task.title,
123
+ type: "status_changed",
124
+ });
125
+ }
126
+
127
128
return c.json(task);
129
},
130
)
0 commit comments