mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
Add eslint rule and fix as many issues as possible
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { Request, Response } from 'express';
|
||||
import Stripe from 'stripe';
|
||||
import { getStripeSecretKey, getStripeWebhookSecret } from '../../config';
|
||||
import { Request, Response } from "express";
|
||||
import Stripe from "stripe";
|
||||
import { getStripeSecretKey, getStripeWebhookSecret } from "../../config";
|
||||
|
||||
/**
|
||||
* Handle service provisioning/un-provisioning via Stripe
|
||||
@@ -11,10 +11,10 @@ import { getStripeSecretKey, getStripeWebhookSecret } from '../../config';
|
||||
export const handleWebhook = async (req: Request, res: Response) => {
|
||||
// check request for valid stripe signature
|
||||
const stripe = new Stripe(await getStripeSecretKey(), {
|
||||
apiVersion: '2022-08-01'
|
||||
apiVersion: "2022-08-01",
|
||||
});
|
||||
|
||||
const sig = req.headers['stripe-signature'] as string;
|
||||
const sig = req.headers["stripe-signature"] as string;
|
||||
const event = stripe.webhooks.constructEvent(
|
||||
req.body,
|
||||
sig,
|
||||
@@ -22,7 +22,7 @@ export const handleWebhook = async (req: Request, res: Response) => {
|
||||
);
|
||||
|
||||
switch (event.type) {
|
||||
case '':
|
||||
case "":
|
||||
break;
|
||||
default:
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user