Skip to content

Commit

Permalink
fix: body
Browse files Browse the repository at this point in the history
  • Loading branch information
0x73746F66 committed Jun 15, 2024
1 parent a46eee9 commit 296f123
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions functions/github/webhook.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export async function onRequestPost(context) {
console.log('signature', signature)
const jsonData = await readRequestBody(request)
console.log('jsonData', jsonData)
await env.r2icache.put(`/github/${installation_id}/${jsonData.action}/${hook_id}.json`, jsonData)
const info = await env.r2icache.put(`/github/${installation_id}/${jsonData.action}/${hook_id}.json`, jsonData)

// if (signature) {
// const info = await env.d1db.prepare('INSERT INTO audit (installation_id, memberEmail, access_key) VALUES (?1, ?2, ?3)')
Expand All @@ -27,7 +27,7 @@ export async function onRequestPost(context) {
// console.log(`/github/install installation_id=${params?.installation_id} kid=${token}`, info)
// return Response.json(info)
// }
return new Response(await readRequestBody(request))
return new Response(info)
}

async function verifySignature(secret, header, payload) {
Expand Down

0 comments on commit 296f123

Please sign in to comment.