add ctasks routes

This commit is contained in:
2025-06-07 14:59:22 +05:30
parent 01b40dd757
commit bec293193f
9 changed files with 600 additions and 1 deletions

View File

@@ -65,6 +65,8 @@ export async function taskRoutes(fastify: FastifyInstance) {
},
body: $task("updateTaskInput"),
},
config: { requiredClaims: ["task:write"] },
preHandler: [fastify.authorize],
},
updateTaskHandler
);
@@ -119,7 +121,7 @@ export async function taskRoutes(fastify: FastifyInstance) {
},
},
},
config: { requiredClaims: ["rts:read"] },
config: { requiredClaims: ["task:read"] },
preHandler: [fastify.authorize],
},
async (req, res) => {