MCPcopy Create free account
hub / github.com/Linen-dev/linen.dev / handler

Function handler

apps/web/pages/api/inbox/index.ts:164–177  ·  view source on GitHub ↗
(
  request: NextApiRequest,
  response: NextApiResponse
)

Source from the content-addressed store, hash-verified

162};
163
164export default async function handler(
165 request: NextApiRequest,
166 response: NextApiResponse
167) {
168 if (request.method === 'OPTIONS') {
169 return preflight(request, response, ['POST']);
170 }
171 cors(request, response);
172 // using POST to prevent url length limit
173 if (request.method === 'POST') {
174 return handlers.index(request, response);
175 }
176 return response.status(405).json({});
177}

Callers

nothing calls this directly

Calls 2

preflightFunction · 0.90
corsFunction · 0.90

Tested by

no test coverage detected