feat: Use Folders to organize SMS links on Dub (#19248)
* feat: Use Folders to organize SMS links on Dub * Update yarn.lock --------- Co-authored-by: sean-brydon <[email protected]> Co-authored-by: Bailey Pumfleet <[email protected]>
This commit is contained in:
3 files changed
+11
-7
No files matched your search
@@ -13,7 +13,7 @@
|
||||
"@calcom/trpc": "*",
|
||||
"@calcom/ui": "*",
|
||||
"bcryptjs": "^2.4.3",
|
||||
"dub": "^0.46.15",
|
||||
"dub": "^0.49.1",
|
||||
"handlebars": "^4.7.7",
|
||||
"jose": "^4.13.1",
|
||||
"lru-cache": "^9.0.3",
|
||||
|
||||
@@ -3,7 +3,11 @@ import { dub } from "@calcom/features/auth/lib/dub";
|
||||
export const bulkShortenLinks = async (links: string[]) => {
|
||||
const linksToShorten = links.filter((link) => link);
|
||||
const results = await dub.links.createMany(
|
||||
linksToShorten.map((link) => ({ domain: "sms.cal.com", url: link }))
|
||||
linksToShorten.map((link) => ({
|
||||
domain: "sms.cal.com",
|
||||
url: link,
|
||||
folderId: "fold_wx3NZDKQYbLDbncSubeMu0ss",
|
||||
}))
|
||||
);
|
||||
return links.map((link) => {
|
||||
const createdLink = results.find(
|
||||
|
||||
Reference in new issue
Block a user