(req: NextApiRequest, res: NextApiResponse)
| 3 | import { getPaymentListByEmail } from "./utils/payment"; |
| 4 | |
| 5 | const 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 | |
| 16 | export default handler; |
nothing calls this directly
no test coverage detected