Add eslint rule and fix as many issues as possible

This commit is contained in:
Khoa Le
2023-06-19 23:32:35 -04:00
parent e9eacc445d
commit 9d33e4756b
689 changed files with 9446 additions and 21821 deletions

View File

@@ -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:
}