fix: qbt webhook
This commit is contained in:
parent
bd96d506c9
commit
f7063a355a
1 changed files with 1 additions and 1 deletions
|
@ -7,7 +7,7 @@ import { env } from '~/backend/env'
|
|||
import { telegramNotify } from '~/backend/bot/notify'
|
||||
|
||||
export const POST: APIRoute = async (ctx) => {
|
||||
if (new URLSearchParams(ctx.request.url).get('secret') !== env.QBT_WEBHOOK_SECRET) {
|
||||
if (new URL(ctx.request.url).searchParams.get('secret') !== env.QBT_WEBHOOK_SECRET) {
|
||||
return new Response('Unauthorized', { status: 401 })
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue