MCPcopy Index your code
hub / github.com/sqlchat/sqlchat / handler

Function handler

src/pages/api/payment.ts:5–14  ·  view source on GitHub ↗
(req: NextApiRequest, res: NextApiResponse)

Source from the content-addressed store, hash-verified

3import { getPaymentListByEmail } from "./utils/payment";
4
5const handler = async (req: NextApiRequest, res: NextApiResponse) => {
6 if (req.method !== "GET") {
7 return res.status(405).json([]);
8 }
9
10 const endUser = await getEndUser(req, res);
11 const paymentList = await getPaymentListByEmail(endUser);
12
13 res.status(200).json(paymentList);
14};
15
16export default handler;

Callers

nothing calls this directly

Calls 2

getEndUserFunction · 0.90
getPaymentListByEmailFunction · 0.90

Tested by

no test coverage detected