removed duplicated logic

This commit is contained in:
Zai Shi 2024-12-12 10:27:52 -08:00
parent e07142f086
commit 465c214f27

View File

@ -20,9 +20,7 @@ async function sendWebhooks(options: {
projectId: string,
data: any,
}) {
const apiKey = getEnvVariable("STACK_SVIX_API_KEY");
const server = getEnvVariable("STACK_SVIX_SERVER_URL", "") || undefined;
const svix = new Svix(apiKey, { serverUrl: server });
const svix = getSvixClient();
try {
await svix.application.getOrCreate({ uid: options.projectId, name: options.projectId });