Compare commits

..

No commits in common. "probablycorey-patch-9" and "main" have entirely different histories.

12
code.ts
View File

@ -7,7 +7,15 @@ interface ErrorLog {
timestamp: string
message: string
stack?: string
paylo
payload: any
}
const errors: ErrorLog[] = []
const server = serve({
port: parseInt(process.env.PORT || "3000"),
routes: {
"/": {
GET: () => new Response("🌵"),
POST: () => new Response("Use /gitea/webhook for POST requests", { status: 400 }),
},
@ -22,7 +30,7 @@ interface ErrorLog {
"/gitea/webhook": {
POST: async (req) => {
const payload = await req.json()
const evasadfasdfentType = req.headers.get("X-Gitea-Event") || "unknown"
const eventType = req.headers.get("X-Gitea-Event") || "unknown"
console.log(`🌵 Received Gitea webhook ${eventType}`)
try {