Skip to main content
Glama
email-subscriptions.ts1.32 kB
import { emailSubscriptionData } from "@repo/db/database/admin"; import { zCreateEmailSubscriptionSchema, zSearchEmailSubscriptionsSchema, zUpdateEmailSubscriptionSchema, } from "@repo/db/types"; import { z } from "zod"; import { adminProcedure, router } from "../../trpc"; export const emailSubscriptionsRouter = router({ // 创建邮件订阅 create: adminProcedure .input(zCreateEmailSubscriptionSchema) .mutation(async ({ input }) => { return await emailSubscriptionData.create(input); }), // 更新邮件订阅 update: adminProcedure .input(zUpdateEmailSubscriptionSchema) .mutation(async ({ input }) => { // @ts-expect-error return await emailSubscriptionData.update(input); }), // 获取邮件订阅 get: adminProcedure .input(z.object({ id: z.string() })) .query(async ({ input }) => { return await emailSubscriptionData.getById(input.id); }), // 搜索邮件订阅 search: adminProcedure .input(zSearchEmailSubscriptionsSchema) .query(async ({ input }) => { return await emailSubscriptionData.search(input); }), // 删除邮件订阅 delete: adminProcedure .input(z.object({ id: z.string() })) .mutation(async ({ input }) => { return await emailSubscriptionData.delete(input.id); }), });

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/metacode0602/open-mcp'

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