create alerts when user is assignedTo a resource
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user