mirror of
https://github.com/PretendoNetwork/website.git
synced 2026-09-07 16:36:55 -05:00
chore: fix linting in entire project
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
import { REST } from '@discordjs/rest';
|
||||
import { Routes } from 'discord-api-types/v10';
|
||||
import type { H3Event } from 'h3'
|
||||
import type { H3Event } from 'h3';
|
||||
|
||||
type DiscordIds = { guildId: string, supporterRoleId: string | null, testerRoleId: string | null }
|
||||
type DiscordIds = { guildId: string; supporterRoleId: string | null; testerRoleId: string | null };
|
||||
|
||||
type DiscordInstance = {
|
||||
rest: REST,
|
||||
clientId: string,
|
||||
clientSecret: string,
|
||||
baseUrl: string,
|
||||
ids: DiscordIds,
|
||||
makeCallbackUrl: () => string,
|
||||
}
|
||||
rest: REST;
|
||||
clientId: string;
|
||||
clientSecret: string;
|
||||
baseUrl: string;
|
||||
ids: DiscordIds;
|
||||
makeCallbackUrl: () => string;
|
||||
};
|
||||
|
||||
let discordInstance: DiscordInstance | null = null;
|
||||
|
||||
@@ -21,18 +21,18 @@ export function useDiscord(event: H3Event): DiscordInstance | null {
|
||||
if (config.discordBotToken && config.discordGuildId && config.discordClientId && config.discordClientSecret) {
|
||||
discordInstance = {
|
||||
rest: new REST({ version: '10' }).setToken(config.discordBotToken),
|
||||
baseUrl: "https://discord.com/api/v10",
|
||||
baseUrl: 'https://discord.com/api/v10',
|
||||
clientId: config.discordClientId,
|
||||
clientSecret: config.discordClientSecret,
|
||||
ids: {
|
||||
guildId: config.discordGuildId,
|
||||
testerRoleId: config.discordTesterRoleId ? config.discordTesterRoleId : null,
|
||||
supporterRoleId: config.discordSupporterRoleId ? config.discordSupporterRoleId : null,
|
||||
supporterRoleId: config.discordSupporterRoleId ? config.discordSupporterRoleId : null
|
||||
},
|
||||
makeCallbackUrl() {
|
||||
return new URL('/account/connect/discord', config.public.baseUrl).toString()
|
||||
},
|
||||
}
|
||||
return new URL('/account/connect/discord', config.public.baseUrl).toString();
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { H3Event } from 'h3'
|
||||
import type { H3Event } from 'h3';
|
||||
|
||||
export type AuthContext = {
|
||||
pid: number;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Octokit } from "octokit";
|
||||
import type { Octokit } from 'octokit';
|
||||
|
||||
export type GithubProjectTaskStatus = 'completed' | 'inprogress' | 'notstarted';
|
||||
|
||||
@@ -7,17 +7,17 @@ export type GithubProject = {
|
||||
url: string;
|
||||
tasks: Array<{
|
||||
title: string;
|
||||
status: GithubProjectTaskStatus,
|
||||
}>
|
||||
}
|
||||
status: GithubProjectTaskStatus;
|
||||
}>;
|
||||
};
|
||||
|
||||
export type GithubProjectResponse = {
|
||||
projects: GithubProject[];
|
||||
}
|
||||
};
|
||||
|
||||
const orgName = "PretendoNetwork";
|
||||
const orgName = 'PretendoNetwork';
|
||||
const cacheMaxAgeMs = 60 * 60 * 1000; // 1 hour
|
||||
let cache: { response: GithubProjectResponse, createdAt: Date } | null = null;
|
||||
let cache: { response: GithubProjectResponse; createdAt: Date } | null = null;
|
||||
|
||||
const getProjectsV2GQL = `
|
||||
query getProjectsV2($orgName: String!, $cursor: String) {
|
||||
@@ -79,7 +79,7 @@ query getProjectsV2Fields($id: ID!, $cursor: String) {
|
||||
`;
|
||||
|
||||
async function getGitHubProjectsV2(octokit: Octokit) {
|
||||
const projects: Array<{ id: string, title: string, url: string | null }> = [];
|
||||
const projects: Array<{ id: string; title: string; url: string | null }> = [];
|
||||
|
||||
const data = await octokit.graphql.paginate(getProjectsV2GQL, {
|
||||
orgName: orgName
|
||||
@@ -89,7 +89,7 @@ async function getGitHubProjectsV2(octokit: Octokit) {
|
||||
projects.push({
|
||||
id: node.id,
|
||||
title: node.title,
|
||||
url: node.repositories.nodes[0]?.url ?? null,
|
||||
url: node.repositories.nodes[0]?.url ?? null
|
||||
});
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ async function getGitHubProjectsV2(octokit: Octokit) {
|
||||
}
|
||||
|
||||
async function getGitHubProjectsV2Fields(octokit: Octokit, id: string) {
|
||||
const output: Array<{ title: string, column: string }> = [];
|
||||
const output: Array<{ title: string; column: string }> = [];
|
||||
|
||||
const data: any = await octokit.graphql.paginate(getProjectsV2FieldsGQL, {
|
||||
id: id
|
||||
@@ -125,7 +125,7 @@ async function getGithubProjectsData(octokit: Octokit): Promise<GithubProjectRes
|
||||
const projectOutput: GithubProject = {
|
||||
title: project.title,
|
||||
url: project.url,
|
||||
tasks: [],
|
||||
tasks: []
|
||||
};
|
||||
|
||||
const fields = await getGitHubProjectsV2Fields(octokit, project.id);
|
||||
@@ -133,24 +133,26 @@ async function getGithubProjectsData(octokit: Octokit): Promise<GithubProjectRes
|
||||
const fieldMap: Record<string, GithubProjectTaskStatus> = {
|
||||
done: 'completed',
|
||||
in_progress: 'inprogress',
|
||||
todo: 'notstarted',
|
||||
}
|
||||
todo: 'notstarted'
|
||||
};
|
||||
|
||||
for (const field of fields) {
|
||||
const normalizedStatus = field.column.toLowerCase().replace(' ', '_');
|
||||
const status = fieldMap[normalizedStatus];
|
||||
if (!status) continue;
|
||||
if (!status) {
|
||||
continue;
|
||||
}
|
||||
projectOutput.tasks.push({
|
||||
status,
|
||||
title: field.title,
|
||||
})
|
||||
title: field.title
|
||||
});
|
||||
}
|
||||
|
||||
output.push(projectOutput);
|
||||
}
|
||||
|
||||
return {
|
||||
projects: output,
|
||||
projects: output
|
||||
};
|
||||
}
|
||||
|
||||
@@ -159,8 +161,8 @@ export async function getGithubProjects(octokit: Octokit | null, ignoreCache = f
|
||||
// No github credentials, assume there are no projects
|
||||
if (!octokit) {
|
||||
return {
|
||||
projects: [],
|
||||
}
|
||||
projects: []
|
||||
};
|
||||
}
|
||||
|
||||
cache = {
|
||||
|
||||
@@ -1,25 +1,27 @@
|
||||
import Stripe from "stripe";
|
||||
import type { Stripe } from 'stripe';
|
||||
|
||||
export type StripeDonationResponse = {
|
||||
donatorCount: number;
|
||||
totalDonationsCents: number;
|
||||
}
|
||||
};
|
||||
|
||||
const cacheMaxAgeMs = 60 * 60 * 1000; // 1 hour
|
||||
let cache: { response: StripeDonationResponse, createdAt: Date } | null = null;
|
||||
let cache: { response: StripeDonationResponse; createdAt: Date } | null = null;
|
||||
|
||||
async function getStripeDonationData(stripe: Stripe): Promise<StripeDonationResponse> {
|
||||
const donationData: StripeDonationResponse = {
|
||||
donatorCount: 0,
|
||||
totalDonationsCents: 0,
|
||||
totalDonationsCents: 0
|
||||
};
|
||||
|
||||
await stripe.subscriptions.list({
|
||||
limit: 100,
|
||||
status: 'active',
|
||||
status: 'active'
|
||||
}).autoPagingEach((sub) => {
|
||||
const plan = sub.items.data[0]?.plan;
|
||||
if (!plan) return;
|
||||
if (!plan) {
|
||||
return;
|
||||
}
|
||||
donationData.donatorCount += 1;
|
||||
donationData.totalDonationsCents += plan?.amount ?? 0;
|
||||
});
|
||||
@@ -27,15 +29,14 @@ async function getStripeDonationData(stripe: Stripe): Promise<StripeDonationResp
|
||||
return donationData;
|
||||
}
|
||||
|
||||
|
||||
export async function getStripeDonations(stripe: Stripe | null, ignoreCache = false): Promise<StripeDonationResponse> {
|
||||
if (!cache || new Date(cache.createdAt.getTime() + cacheMaxAgeMs) < new Date() || ignoreCache) {
|
||||
// No credentials, fill in blank data
|
||||
if (!stripe) {
|
||||
return {
|
||||
donatorCount: 0,
|
||||
totalDonationsCents: 0,
|
||||
}
|
||||
totalDonationsCents: 0
|
||||
};
|
||||
}
|
||||
|
||||
cache = {
|
||||
|
||||
@@ -1,32 +1,35 @@
|
||||
import { Stripe } from "stripe";
|
||||
import { useMailer } from "./mailer";
|
||||
import { PnidDocument, usePapr } from "./papr";
|
||||
import { Transporter } from "nodemailer";
|
||||
import { PaprMatchKeysAndValues } from "papr";
|
||||
import { useMailer } from './mailer';
|
||||
import { usePapr } from './papr';
|
||||
import { assignDiscordMemberSupporterRole, assignDiscordMemberTesterRole, removeDiscordMemberSupporterRole, removeDiscordMemberTesterRole, useDiscord } from './discord';
|
||||
import type { Transporter } from 'nodemailer';
|
||||
import type { PaprMatchKeysAndValues } from 'papr';
|
||||
import type { Stripe } from 'stripe';
|
||||
import type { H3Event } from 'h3';
|
||||
import { assignDiscordMemberSupporterRole, assignDiscordMemberTesterRole, removeDiscordMemberSupporterRole, removeDiscordMemberTesterRole, useDiscord } from "./discord";
|
||||
import type { PnidDocument } from './papr';
|
||||
|
||||
async function sendEmailToCustomer(mailer: Transporter, customer: Stripe.Customer, ops: { pid: number, title: string, body: string }): Promise<void> {
|
||||
async function sendEmailToCustomer(mailer: Transporter, customer: Stripe.Customer, ops: { pid: number; title: string; body: string }): Promise<void> {
|
||||
try {
|
||||
if (!customer.email) throw new Error("Customer does not have an email");
|
||||
if (!customer.email) {
|
||||
throw new Error('Customer does not have an email');
|
||||
}
|
||||
await mailer.sendMail({
|
||||
to: customer.email,
|
||||
subject: ops.title,
|
||||
text: ops.body,
|
||||
text: ops.body
|
||||
});
|
||||
} catch (error) {
|
||||
console.error(`Error sending email | ${customer.id}, ${ops.pid}, ${customer.email} |`, error);
|
||||
}
|
||||
}
|
||||
|
||||
async function sendToNotificationEmails(mailer: Transporter, notificationEmails: string[], ops: { title: string, body: string }): Promise<void> {
|
||||
async function sendToNotificationEmails(mailer: Transporter, notificationEmails: string[], ops: { title: string; body: string }): Promise<void> {
|
||||
for (const email of notificationEmails) {
|
||||
// * Send notification emails for new sub
|
||||
try {
|
||||
await mailer.sendMail({
|
||||
to: email,
|
||||
subject: `[Pretendo] - ${ops.title}`,
|
||||
text: ops.body,
|
||||
text: ops.body
|
||||
});
|
||||
} catch (error) {
|
||||
console.error(`Error sending notification email | ${email} |`, error);
|
||||
@@ -49,7 +52,9 @@ export async function handleStripeEvent(event: H3Event, stripe: Stripe, webhook:
|
||||
if (webhook.type === 'customer.subscription.updated' || webhook.type === 'customer.subscription.deleted') {
|
||||
const subscription = webhook.data.object;
|
||||
const subscriptionItem = subscription.items.data[0];
|
||||
if (!subscriptionItem) throw new Error("No subscription item subscription");
|
||||
if (!subscriptionItem) {
|
||||
throw new Error('No subscription item subscription');
|
||||
}
|
||||
const product = await stripe.products.retrieve(subscriptionItem.plan.product as string);
|
||||
const customer = await stripe.customers.retrieve(subscription.customer as string);
|
||||
|
||||
@@ -69,7 +74,9 @@ export async function handleStripeEvent(event: H3Event, stripe: Stripe, webhook:
|
||||
|
||||
const invoice = await stripe.invoices.retrieve(subscription.latest_invoice as string);
|
||||
const intent = invoice.payments?.data[0]?.payment.payment_intent;
|
||||
if (!intent) throw new Error("No intent found")
|
||||
if (!intent) {
|
||||
throw new Error('No intent found');
|
||||
}
|
||||
await stripe.refunds.create({
|
||||
payment_intent: intent as string
|
||||
});
|
||||
@@ -81,7 +88,7 @@ export async function handleStripeEvent(event: H3Event, stripe: Stripe, webhook:
|
||||
pid: 0,
|
||||
title: 'Pretendo Network Subscription Failed - No Linked PNID',
|
||||
body: `Your recent subscription to Pretendo Network has failed.\nThis is due to no PNID PID being linked to the Stripe customer account used. The subscription has been canceled and refunded. Please contact Jon immediately.\nStripe Customer ID: ${customer.id}`
|
||||
})
|
||||
});
|
||||
} else {
|
||||
console.error(`Stripe user ${customer.id} has no PNID linked!`);
|
||||
}
|
||||
@@ -104,7 +111,9 @@ export async function handleStripeEvent(event: H3Event, stripe: Stripe, webhook:
|
||||
if (subscription.latest_invoice) {
|
||||
const invoice = await stripe.invoices.retrieve(subscription.latest_invoice as string);
|
||||
const intent = invoice.payments?.data[0]?.payment.payment_intent;
|
||||
if (!intent) throw new Error("No intent found")
|
||||
if (!intent) {
|
||||
throw new Error('No intent found');
|
||||
}
|
||||
await stripe.refunds.create({
|
||||
payment_intent: intent as string
|
||||
});
|
||||
@@ -117,7 +126,7 @@ export async function handleStripeEvent(event: H3Event, stripe: Stripe, webhook:
|
||||
pid: 0,
|
||||
title: 'Pretendo Network Subscription Failed - PNID Not Found',
|
||||
body: `Your recent subscription to Pretendo Network has failed.\nThis is due to the provided PNID not being found. The subscription has been canceled and refunded. Please contact Jon immediately.\nStripe Customer ID: ${customer.id}\nPNID PID: ${pid}`
|
||||
})
|
||||
});
|
||||
} else {
|
||||
console.error(`PNID PID ${pid} does not exist! Found on Stripe user ${customer.id}!`);
|
||||
}
|
||||
@@ -235,7 +244,7 @@ export async function handleStripeEvent(event: H3Event, stripe: Stripe, webhook:
|
||||
pid,
|
||||
title: `Pretendo Network ${product.name} Subscription - Active`,
|
||||
body: `Thank you for purchasing the ${product.name} tier! We greatly value your support, thank you for helping keep Pretendo Network alive!\nIt may take a moment for your account dashboard to reflect these changes. Please wait a moment and refresh the dashboard to see them!`
|
||||
})
|
||||
});
|
||||
|
||||
if (discord && discordId && product.metadata.discord_role_id) {
|
||||
await assignDiscordMemberSupporterRole(discord, discordId, product.metadata.discord_role_id).catch((error) => {
|
||||
@@ -245,14 +254,14 @@ export async function handleStripeEvent(event: H3Event, stripe: Stripe, webhook:
|
||||
|
||||
await sendToNotificationEmails(mailer, notificationEmails, {
|
||||
title: `New ${product.name} subscription`,
|
||||
body: `${pnid.username} just became a ${product.name} tier subscriber`,
|
||||
})
|
||||
body: `${pnid.username} just became a ${product.name} tier subscriber`
|
||||
});
|
||||
} else if (subscription.status === 'canceled') {
|
||||
await sendEmailToCustomer(mailer, customer, {
|
||||
pid,
|
||||
title: `Pretendo Network ${product.name} Subscription - Canceled`,
|
||||
body: `Your subscription for the ${product.name} tier has been canceled. We thank for your previous support, and hope you still enjoy the network! `
|
||||
})
|
||||
});
|
||||
|
||||
if (discord && discordId && product.metadata.discord_role_id) {
|
||||
await removeDiscordMemberSupporterRole(discord, discordId, product.metadata.discord_role_id).catch((error) => {
|
||||
@@ -262,14 +271,14 @@ export async function handleStripeEvent(event: H3Event, stripe: Stripe, webhook:
|
||||
|
||||
await sendToNotificationEmails(mailer, notificationEmails, {
|
||||
title: `Canceled ${product.name} subscription`,
|
||||
body: `${pnid.username} just canceled their ${product.name} tier subscription`,
|
||||
})
|
||||
body: `${pnid.username} just canceled their ${product.name} tier subscription`
|
||||
});
|
||||
} else if (subscription.status === 'unpaid') {
|
||||
await sendEmailToCustomer(mailer, customer, {
|
||||
pid,
|
||||
title: `Pretendo Network ${product.name} Subscription - Unpaid`,
|
||||
body: `Your subscription for the ${product.name} tier has been canceled due to non payment. We thank for your previous support, and hope you still enjoy the network! `
|
||||
})
|
||||
});
|
||||
|
||||
if (discord && discordId && product.metadata.discord_role_id) {
|
||||
await removeDiscordMemberSupporterRole(discord, discordId, product.metadata.discord_role_id).catch((error) => {
|
||||
@@ -279,14 +288,14 @@ export async function handleStripeEvent(event: H3Event, stripe: Stripe, webhook:
|
||||
|
||||
await sendToNotificationEmails(mailer, notificationEmails, {
|
||||
title: `Removed ${product.name} subscription`,
|
||||
body: `${pnid.username}'s ${product.name} tier subscription has been canceled due to non payment`,
|
||||
})
|
||||
body: `${pnid.username}'s ${product.name} tier subscription has been canceled due to non payment`
|
||||
});
|
||||
} else {
|
||||
await sendEmailToCustomer(mailer, customer, {
|
||||
pid,
|
||||
title: `Pretendo Network ${product.name} Subscription - ${subscription.status}`,
|
||||
body: `Your subscription for the ${product.name} tier has changed status to ${subscription.status}. This is usually caused by payment failure. Your account has been reverted back to default until payment resumes. If you believe this to be an error, please reach out for support on our Discord server, and we thank you for your previous support!`
|
||||
})
|
||||
});
|
||||
|
||||
if (discord && discordId && product.metadata.discord_role_id) {
|
||||
await removeDiscordMemberSupporterRole(discord, discordId, product.metadata.discord_role_id).catch((error) => {
|
||||
@@ -296,8 +305,8 @@ export async function handleStripeEvent(event: H3Event, stripe: Stripe, webhook:
|
||||
|
||||
await sendToNotificationEmails(mailer, notificationEmails, {
|
||||
title: `Removed ${product.name} subscription`,
|
||||
body: `${pnid.username}'s ${product.name} tier subscription status has been changed to ${subscription.status}`,
|
||||
})
|
||||
body: `${pnid.username}'s ${product.name} tier subscription status has been changed to ${subscription.status}`
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +1,22 @@
|
||||
import type { H3Event } from 'h3'
|
||||
import hcaptcha from 'hcaptcha'
|
||||
import hcaptcha from 'hcaptcha';
|
||||
import type { H3Event } from 'h3';
|
||||
|
||||
export async function hcaptchaVerify(event: H3Event, captchaResponse: string | null | undefined): Promise<boolean> {
|
||||
const config = useRuntimeConfig(event);
|
||||
if (!config.hcaptchaSiteKey) return true; // No captcha is configured, always valid
|
||||
if (!config.hcaptchaSecretKey) throw new Error("Hcaptcha not configured correctly, missing secret key");
|
||||
if (!config.hcaptchaSiteKey) {
|
||||
return true;
|
||||
} // No captcha is configured, always valid
|
||||
if (!config.hcaptchaSecretKey) {
|
||||
throw new Error('Hcaptcha not configured correctly, missing secret key');
|
||||
}
|
||||
|
||||
if (!captchaResponse) return false; // No captcha filled in, invalid
|
||||
if (!captchaResponse) {
|
||||
return false;
|
||||
} // No captcha filled in, invalid
|
||||
const captchaVerify = await hcaptcha.verify(config.hcaptchaSiteKey, captchaResponse, undefined, config.hcaptchaSiteKey);
|
||||
|
||||
if (!captchaVerify.success) return false; // Invalid captcha response
|
||||
if (!captchaVerify.success) {
|
||||
return false;
|
||||
} // Invalid captcha response
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
export function useHttpApi(event: H3Event) {
|
||||
const config = useRuntimeConfig(event);
|
||||
return $fetch.create({
|
||||
baseURL: config.public.apiBase,
|
||||
baseURL: config.public.apiBase
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { createTransport, Transporter } from "nodemailer";
|
||||
import type { H3Event } from 'h3'
|
||||
import { createTransport } from 'nodemailer';
|
||||
import type { Transporter } from 'nodemailer';
|
||||
import type { H3Event } from 'h3';
|
||||
|
||||
let transport: Transporter | null = null;
|
||||
|
||||
@@ -10,7 +11,7 @@ export function useMailer(event: H3Event): Transporter | null {
|
||||
transport = createTransport({
|
||||
from: {
|
||||
address: config.smtpFromEmail,
|
||||
name: config.smtpFromName ? config.smtpFromName : undefined,
|
||||
name: config.smtpFromName ? config.smtpFromName : undefined
|
||||
},
|
||||
host: config.smtpHost,
|
||||
port: config.smtpPort,
|
||||
@@ -18,7 +19,7 @@ export function useMailer(event: H3Event): Transporter | null {
|
||||
auth: {
|
||||
user: config.smtpUser ? config.smtpUser : undefined,
|
||||
pass: config.smtpPassword ? config.smtpPassword : undefined
|
||||
},
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Octokit } from "octokit"
|
||||
import type { H3Event } from 'h3'
|
||||
import { Octokit } from 'octokit';
|
||||
import type { H3Event } from 'h3';
|
||||
|
||||
let octokit: Octokit | null = null;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { MongoClient } from "mongodb";
|
||||
import Papr, { schema, types } from "papr"
|
||||
import type { H3Event } from 'h3'
|
||||
import { MongoClient } from 'mongodb';
|
||||
import Papr, { schema, types } from 'papr';
|
||||
import type { H3Event } from 'h3';
|
||||
|
||||
const papr = new Papr();
|
||||
let conn: MongoClient | null = null;
|
||||
@@ -17,10 +17,10 @@ const pnidSchema = schema({
|
||||
price_id: types.string(),
|
||||
tier_level: types.number(),
|
||||
tier_name: types.string(),
|
||||
latest_webhook_timestamp: types.number(),
|
||||
latest_webhook_timestamp: types.number()
|
||||
}),
|
||||
discord: types.object({
|
||||
id: types.string(),
|
||||
id: types.string()
|
||||
})
|
||||
})
|
||||
});
|
||||
@@ -29,7 +29,7 @@ export type PnidDocument = (typeof pnidSchema)[0];
|
||||
|
||||
const paprInstance = {
|
||||
papr,
|
||||
Pnid,
|
||||
Pnid
|
||||
} as const;
|
||||
|
||||
export type PaprInstance = typeof paprInstance;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { z, ZodType } from 'zod';
|
||||
import type { H3Event } from 'h3'
|
||||
import type { H3Event } from 'h3';
|
||||
|
||||
export async function readZodBody<T extends ZodType>(event: H3Event, schema: T): Promise<z.infer<T>> {
|
||||
const body = await readValidatedBody(event, schema.safeParse);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Stripe } from "stripe"
|
||||
import type { H3Event } from 'h3'
|
||||
import { Stripe } from 'stripe';
|
||||
import type { H3Event } from 'h3';
|
||||
|
||||
let stripe: Stripe | null = null;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import { ApiServiceDefinition } from '@pretendonetwork/grpc/api/v2/api_service';
|
||||
import { APIDefinition } from '@pretendonetwork/grpc/api/api_service';
|
||||
import { AccountServiceDefinition } from '@pretendonetwork/grpc/account/v2/account_service';
|
||||
import type { Channel, Client, CompatServiceDefinition } from 'nice-grpc';
|
||||
import type { H3Event } from 'h3'
|
||||
import type { H3Event } from 'h3';
|
||||
|
||||
let grpc: { channel: Channel } | null = null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user