forked from dubinc/dub
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6855e1e
commit e70f3b9
Showing
15 changed files
with
155 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 29,10 @@ export async function processLink<T extends Record<string, any>>({ | |
skipExternalIdChecks = false, // only skip when externalId doesn't change (e.g. when editing a link) | ||
}: { | ||
payload: NewLinkProps & T; | ||
workspace?: Pick<WorkspaceProps, "id" | "plan" | "conversionEnabled">; | ||
workspace?: Pick< | ||
WorkspaceProps, | ||
"id" | "plan" | "conversionEnabled" | "flags" | ||
>; | ||
userId?: string; | ||
bulk?: boolean; | ||
skipKeyChecks?: boolean; | ||
|
@@ -199,6 202,15 @@ export async function processLink<T extends Record<string, any>>({ | |
}; | ||
} | ||
|
||
if (domain === "cal.link" && !workspace?.flags?.callink) { | ||
return { | ||
link: payload, | ||
error: | ||
"You can only use the cal.link domain if you have beta access to it. Contact [email protected] to get access.", | ||
code: "forbidden", | ||
}; | ||
} | ||
|
||
// else, check if the domain belongs to the workspace | ||
} else if (!domains?.find((d) => d.slug === domain)) { | ||
return { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.