mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-08-03 04:29:40 +00:00
remove un-necessary JSON.parse
This commit is contained in:
parent
771d8f492a
commit
9d456e934c
1 changed files with 1 additions and 4 deletions
|
|
@ -286,11 +286,8 @@ api.handleWebhooks = async function handleWebhooks (options, stripeInc) {
|
|||
let stripeApi = stripe;
|
||||
if (stripeInc) stripeApi = stripeInc;
|
||||
|
||||
const eventJSON = JSON.parse(requestBody);
|
||||
console.log(eventJSON);
|
||||
|
||||
// Verify the event by fetching it from Stripe
|
||||
const event = await stripeApi.events.retrieve(eventJSON.id);
|
||||
const event = await stripeApi.events.retrieve(requestBody.id);
|
||||
console.log(event);
|
||||
|
||||
switch (event.type) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue