Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

update syntax

Steven Teyaa219728c329
diff --git a/apps/web/app/api/auth/saml/authorize/route.ts b/apps/web/app/api/auth/saml/authorize/route.ts
index ad45cd2978..9f5759db4e 100644
--- a/apps/web/app/api/auth/saml/authorize/route.ts
+++ b/apps/web/app/api/auth/saml/authorize/route.ts
@@ -1,4 +1,4 @@
-import jackson from "@/lib/jackson";
+import { jackson } from "@/lib/jackson";
import { getSearchParams } from "@dub/utils";
import { NextResponse } from "next/server";
diff --git a/apps/web/app/api/auth/saml/callback/route.ts b/apps/web/app/api/auth/saml/callback/route.ts
index e84679986a..fe91e3f1b7 100644
--- a/apps/web/app/api/auth/saml/callback/route.ts
+++ b/apps/web/app/api/auth/saml/callback/route.ts
@@ -1,4 +1,4 @@
-import jackson from "@/lib/jackson";
+import { jackson } from "@/lib/jackson";
import { NextResponse } from "next/server";
export async function POST(req: Request) {
diff --git a/apps/web/app/api/auth/saml/token/route.ts b/apps/web/app/api/auth/saml/token/route.ts
index 9c2338e200..ee7bebf8c8 100644
--- a/apps/web/app/api/auth/saml/token/route.ts
+++ b/apps/web/app/api/auth/saml/token/route.ts
@@ -1,4 +1,4 @@
-import jackson from "@/lib/jackson";
+import { jackson } from "@/lib/jackson";
import { NextResponse } from "next/server";
export async function POST(req: Request) {
diff --git a/apps/web/app/api/auth/saml/userinfo/route.ts b/apps/web/app/api/auth/saml/userinfo/route.ts
index 6c10125694..8addf79da7 100644
--- a/apps/web/app/api/auth/saml/userinfo/route.ts
+++ b/apps/web/app/api/auth/saml/userinfo/route.ts
@@ -1,4 +1,4 @@
-import jackson from "@/lib/jackson";
+import { jackson } from "@/lib/jackson";
import { NextResponse } from "next/server";
export async function GET(req: Request) {
diff --git a/apps/web/app/api/auth/saml/verify/route.tsx b/apps/web/app/api/auth/saml/verify/route.tsx
index dd3baaefe9..906430d0b3 100644
--- a/apps/web/app/api/auth/saml/verify/route.tsx
+++ b/apps/web/app/api/auth/saml/verify/route.tsx
@@ -1,4 +1,4 @@
-import jackson from "@/lib/jackson";
+import { jackson } from "@/lib/jackson";
import { prisma } from "@dub/prisma";
import { NextResponse } from "next/server";
diff --git a/apps/web/app/api/scim/v2.0/[...directory]/route.ts b/apps/web/app/api/scim/v2.0/[...directory]/route.ts
index 6db4cdc6a8..2099bc6f27 100644
--- a/apps/web/app/api/scim/v2.0/[...directory]/route.ts
+++ b/apps/web/app/api/scim/v2.0/[...directory]/route.ts
@@ -1,5 +1,5 @@
import { inviteUser } from "@/lib/api/users";
-import jackson from "@/lib/jackson";
+import { jackson } from "@/lib/jackson";
import { WorkspaceProps } from "@/lib/types";
import type {
DirectorySyncEvent,
diff --git a/apps/web/app/api/workspaces/[idOrSlug]/scim/route.ts b/apps/web/app/api/workspaces/[idOrSlug]/scim/route.ts
index f95ddae128..327d6008e5 100644
--- a/apps/web/app/api/workspaces/[idOrSlug]/scim/route.ts
+++ b/apps/web/app/api/workspaces/[idOrSlug]/scim/route.ts
@@ -1,6 +1,6 @@
import { DubApiError } from "@/lib/api/errors";
import { withWorkspace } from "@/lib/auth";
-import jackson from "@/lib/jackson";
+import { jackson } from "@/lib/jackson";
import z from "@/lib/zod";
import { NextResponse } from "next/server";
diff --git a/apps/web/lib/auth/options.ts b/apps/web/lib/auth/options.ts
index 37603c6db5..a5c46a0676 100644
--- a/apps/web/lib/auth/options.ts
+++ b/apps/web/lib/auth/options.ts
@@ -1,5 +1,5 @@
import { isBlacklistedEmail } from "@/lib/edge-config";
-import jackson from "@/lib/jackson";
+import { jackson } from "@/lib/jackson";
import { isStored, storage } from "@/lib/storage";
import { UserProps } from "@/lib/types";
import { ratelimit } from "@/lib/upstash";
diff --git a/apps/web/lib/jackson.ts b/apps/web/lib/jackson.ts
index 38b90393c2..9f7416a12d 100644
--- a/apps/web/lib/jackson.ts
+++ b/apps/web/lib/jackson.ts
@@ -4,7 +4,7 @@ import type {
IOAuthController,
JacksonOption,
} from "@boxyhq/saml-jackson";
-import jackson from "@boxyhq/saml-jackson";
+import samlJackson from "@boxyhq/saml-jackson";
import { APP_DOMAIN_WITH_NGROK } from "@dub/utils";
export const samlAudience = "https://saml.dub.co";
@@ -39,13 +39,13 @@ declare global {
var directorySyncController: IDirectorySyncController | undefined;
}
-export default async function init() {
+export async function jackson() {
if (
!globalThis.apiController ||
!globalThis.oauthController ||
!globalThis.directorySyncController
) {
- const ret = await jackson(opts);
+ const ret = await samlJackson(opts);
globalThis.apiController = ret.connectionAPIController;
globalThis.oauthController = ret.oauthController;
globalThis.directorySyncController = ret.directorySyncController;