feat: initial commit

This commit is contained in:
Mauricio Siu
2024-04-28 23:57:52 -06:00
parent 8857a20344
commit be56ba046c
412 changed files with 60777 additions and 1 deletions

19
pages/api/webhook.ts Normal file
View File

@@ -0,0 +1,19 @@
import type { NextApiRequest, NextApiResponse } from "next";
export default async function handler(
req: NextApiRequest,
res: NextApiResponse,
) {
if (req.method === "POST") {
const xGitHubEvent = req.headers["x-github-event"];
if (xGitHubEvent === "ping") {
res.redirect(307, "/dashboard/settings");
} else {
res.redirect(307, "/dashboard/settings");
}
} else {
res.setHeader("Allow", ["POST"]);
return res.status(405).end(`Method ${req.method} not allowed`);
}
}