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.

Merge branch 'main' into conversion

Steven Teydf3e52541ebd
diff --cc apps/web/lib/auth/session.ts
index d96281105e,4b48ec5af7..5803abc01a
--- a/apps/web/lib/auth/session.ts
+++ b/apps/web/lib/auth/session.ts
@@@ -1,11 -1,11 +1,12 @@@
import { DubApiError, handleAndReturnErrorResponse } from "@/lib/api/errors";
+import { hashToken } from "@/lib/auth";
import prisma from "@/lib/prisma";
+ import { ratelimit } from "@/lib/upstash";
import { getSearchParams } from "@dub/utils";
- import { ratelimit } from "../upstash";
+ import { waitUntil } from "@vercel/functions";
-import { Session, getSession, hashToken } from "./utils";
+import { Session, getSession } from "./utils";
-interface WithSessionHandler {
+export interface WithSessionHandler {
({
req,
params,
diff --cc apps/web/lib/auth/workspace.ts
index ec955584b6,c454688db5..7baa7c17c7
--- a/apps/web/lib/auth/workspace.ts
+++ b/apps/web/lib/auth/workspace.ts
@@@ -1,6 -1,6 +1,7 @@@
import { DubApiError, handleAndReturnErrorResponse } from "@/lib/api/errors";
+import { hashToken } from "@/lib/auth";
import prisma from "@/lib/prisma";
+ import { ratelimit } from "@/lib/upstash";
import {
API_DOMAIN,
DUB_WORKSPACE_ID,
@@@ -8,10 -8,10 +9,10 @@@
isDubDomain,
} from "@dub/utils";
import { Link as LinkProps } from "@prisma/client";
+ import { waitUntil } from "@vercel/functions";
import { exceededLimitError } from "../api/errors";
import { PlanProps, WorkspaceProps } from "../types";
- import { ratelimit } from "../upstash";
-import { Session, getSession, hashToken } from "./utils";
+import { Session, getSession } from "./utils";
interface WithWorkspaceHandler {
({