Created a list of payments

This commit is contained in:
Tiago Ribeiro
2023-11-27 22:27:51 +00:00
parent 3878d4761e
commit 9bed726062
8 changed files with 400 additions and 5 deletions

View File

@@ -11,9 +11,9 @@ const db = getFirestore(app);
export default withIronSessionApiRoute(handler, sessionOptions);
async function handler(req: NextApiRequest, res: NextApiResponse) {
if (req.method === "GET") await get(req, res);
if (req.method === "DELETE") await del(req, res);
if (req.method === "PATCH") await patch(req, res);
if (req.method === "GET") return await get(req, res);
if (req.method === "DELETE") return await del(req, res);
if (req.method === "PATCH") return await patch(req, res);
res.status(404).json(undefined);
}