Skip to content

AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents

568 B
Raw Blame
import { FastifyPluginAsyncZod } from 'fastify-type-provider-zod'
import { securityAccess } from '../core/security/authorization/fastify-security'
import { projectService } from './project-service'

export const projectWorkerController: FastifyPluginAsyncZod = async (
    app,
) => {
    app.get('/', GetWorkerProjectRequest, async (req) => {
        const projectId = req.principal.projectId
        return projectService(req.log).getOneOrThrow(projectId)
    })
}

const GetWorkerProjectRequest = {
    config: {
        security: securityAccess.engine(),
    },
}