MCPcopy Create free account
hub / github.com/dailydotdev/apps / addLogQueryParams

Function addLogQueryParams

packages/shared/src/lib/share.ts:89–104  ·  view source on GitHub ↗
({
  link,
  userId,
  cid,
}: AddLinkShareLogQueryParams)

Source from the content-addressed store, hash-verified

87 params: AddLinkShareLogQueryParams,
88): string | undefined;
89export function addLogQueryParams({
90 link,
91 userId,
92 cid,
93}: AddLinkShareLogQueryParams): string | undefined {
94 // return link as is if not provided
95 if (!link || !userId || !cid) {
96 return link;
97 }
98
99 const url = new URL(link);
100 url.searchParams.set('userid', userId);
101 url.searchParams.set('cid', cid);
102
103 return url.toString();
104}

Callers 3

SocialShareFunction · 0.90
runTestFunction · 0.90
getShortLinkPropsFunction · 0.90

Calls

no outgoing calls

Tested by 1

runTestFunction · 0.72