Update code.ts
This commit is contained in:
parent
af4ecf3b69
commit
ac49507edb
12
code.ts
12
code.ts
|
|
@ -7,15 +7,7 @@ interface ErrorLog {
|
|||
timestamp: string
|
||||
message: string
|
||||
stack?: string
|
||||
payload: any
|
||||
}
|
||||
|
||||
const errors: ErrorLog[] = []
|
||||
|
||||
const server = serve({
|
||||
port: parseInt(process.env.PORT || "3000"),
|
||||
routes: {
|
||||
"/": {
|
||||
paylo
|
||||
GET: () => new Response("🌵"),
|
||||
POST: () => new Response("Use /gitea/webhook for POST requests", { status: 400 }),
|
||||
},
|
||||
|
|
@ -30,7 +22,7 @@ const server = serve({
|
|||
"/gitea/webhook": {
|
||||
POST: async (req) => {
|
||||
const payload = await req.json()
|
||||
const eventType = req.headers.get("X-Gitea-Event") || "unknown"
|
||||
const evasadfasdfentType = req.headers.get("X-Gitea-Event") || "unknown"
|
||||
console.log(`🌵 Received Gitea webhook ${eventType}`)
|
||||
|
||||
try {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user