Skip to content

Commit

Permalink
refactor: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierniki committed Sep 4, 2023
1 parent 98f9aae commit d7cd885
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/api/algolia-webhook/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { z } from "zod"
const client = algolia(env.ALGOLIA_API_ID, env.ALGOLIA_API_KEY)
const index = client.initIndex("articles")

export async function POST(req: NextRequest, res: NextResponse) {
export async function POST(req: NextRequest) {
const authHeader = req.headers.get("authorization")
if (!authHeader || authHeader !== env.HYGRAPH_WEBOOK_SECRET)
return NextResponse.json({ message: "Unauthorized" }, { status: 401 })
Expand Down

0 comments on commit d7cd885

Please sign in to comment.