create alerts when user is assignedTo a resource

This commit is contained in:
2025-06-21 17:59:41 +05:30
parent e821c8d11d
commit ad24708f85
5 changed files with 45 additions and 6 deletions

View File

@@ -1,5 +1,9 @@
import { FastifyReply, FastifyRequest } from "fastify";
import { CreateTaskInput, UpdateTaskInput, UploadTaskInput } from "./task.schema";
import {
CreateTaskInput,
UpdateTaskInput,
UploadTaskInput,
} from "./task.schema";
import {
createTask,
deleteTask,
@@ -58,7 +62,7 @@ export async function updateTaskHandler(
const { taskId } = req.params as { taskId: string };
try {
const updatedTask = await updateTask(taskId, input, req.user.tenantId);
const updatedTask = await updateTask(taskId, input, req.user);
if (!updatedTask)
return res.code(404).send({ error: "resource not found" });
@@ -111,4 +115,4 @@ export async function newFilesHandler(req: FastifyRequest, res: FastifyReply) {
} catch (err) {
return err;
}
}
}