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 <55134778+sean-brydon@users.noreply.github.com>
Co-authored-by: Bailey Pumfleet <bailey@pumfleet.co.uk>
This commit is contained in:
Steven Tey
2025-02-15 10:06:28 +00:00
committed by GitHub
co-authored by sean-brydon Bailey Pumfleet
parent 5c6f52f1d4
commit be53a20429
3 changed files with 11 additions and 7 deletions
+1 -1
View File
@@ -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(
+5 -5
View File
@@ -4142,7 +4142,7 @@ __metadata:
"@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
@@ -23564,12 +23564,12 @@ __metadata:
languageName: node
linkType: hard
"dub@npm:^0.46.15":
version: 0.46.15
resolution: "dub@npm:0.46.15"
"dub@npm:^0.49.1":
version: 0.49.1
resolution: "dub@npm:0.49.1"
peerDependencies:
zod: ">= 3"
checksum: 36b1260bc3115e5a9122bd165785ecfcc208ff6e6f8dc38c339d9b98132e3d49fe05740659106dcf870cc0bc8037ff6181620347076186e1a82644fb9513983b
checksum: 10a59c1240bbfc6de108e49e42d58a1e762979f19b3e3eb9df94279e5942d55ca18825f19e99a991121dfce0550d92eef50f9eef4e905d151f3379ff78261cff
languageName: node
linkType: hard