Skip to content

Commit

Permalink
test: add webhook endpoint to listen to discord
Browse files Browse the repository at this point in the history
  • Loading branch information
carlossantos74 committed Aug 23, 2024
1 parent 5448ef0 commit 4a49bd1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/app/api/webhooks/discord/route.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { NextRequest, NextResponse } from "next/server";


export async function POST(request: NextRequest): Promise<NextResponse> {
const body = await request.text()
const parsed = JSON.parse(body)

console.log(parsed)

return NextResponse.json({}, { status: 200})
}

0 comments on commit 4a49bd1

Please sign in to comment.