Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

n

Blue Mousee1517f61ff5e
diff --git a/package.json b/package.json
index 86204452b..f94338f64 100644
--- a/package.json
+++ b/package.json
@@ -52,7 +52,6 @@
"nodemailer": "^6.7.2",
"passport": "^0.4.1",
"passport-jwt": "^4.0.0",
- "query-string": "^7.1.0",
"reflect-metadata": "^0.1.13",
"rimraf": "^3.0.2",
"rxjs": "^7.5.1",
diff --git a/src/webhook/webhook.controller.ts b/src/webhook/webhook.controller.ts
index fdc233239..5abeb02af 100644
--- a/src/webhook/webhook.controller.ts
+++ b/src/webhook/webhook.controller.ts
@@ -1,7 +1,6 @@
import {
Controller, Body, Post, Headers, BadRequestException, NotFoundException, UseGuards, Ip,
} from '@nestjs/common'
-import * as querystring from 'query-string'
import { ApiTags } from '@nestjs/swagger'
import * as _isEmpty from 'lodash/isEmpty'
import * as _keys from 'lodash/keys'
@@ -135,10 +134,9 @@ export class WebhookController {
@Post('/paddle')
async paddleWebhook(@Body() body, @Headers() headers, @Ip() reqIP): Promise<any> {
const ip = headers['cf-connecting-ip'] || headers['x-forwarded-for'] || reqIP || ''
- const webhookData = querystring.parse(body)
- console.log(webhookData, webhookData.toString(), querystring.stringify(body))
+ console.log(body)
- if (verifyPaddleWebhook(PADDLE_PUB_KEY, webhookData)) {
+ if (verifyPaddleWebhook(PADDLE_PUB_KEY, body)) {
console.log(headers, ip)
return
}