Skip to main content
Glama

mcp-google-sheets

project-controller.ts1.38 kB
import { EndpointScope, PrincipalType, Project, UpdateProjectRequestInCommunity } from '@activepieces/shared' import { FastifyPluginAsyncTypebox, Type } from '@fastify/type-provider-typebox' import { StatusCodes } from 'http-status-codes' import { paginationHelper } from '../helper/pagination/pagination-utils' import { projectService } from './project-service' export const userProjectController: FastifyPluginAsyncTypebox = async (fastify) => { fastify.get('/:id', async (request) => { return projectService.getOneOrThrow(request.principal.projectId) }) fastify.get('/', async (request) => { return paginationHelper.createPage([await projectService.getUserProjectOrThrow(request.principal.id)], null) }) } export const projectController: FastifyPluginAsyncTypebox = async (fastify) => { fastify.post('/:id', UpdateProjectRequest, async (request) => { return projectService.update(request.params.id, request.body) }) } const UpdateProjectRequest = { config: { allowedPrincipals: [PrincipalType.USER, PrincipalType.SERVICE], scope: EndpointScope.PLATFORM, }, schema: { tags: ['projects'], params: Type.Object({ id: Type.String(), }), response: { [StatusCodes.OK]: Project, }, body: UpdateProjectRequestInCommunity, }, }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/activepieces/activepieces'

If you have feedback or need assistance with the MCP directory API, please join our Discord server