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

Function addLogQueryParams

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

Source from the content-addressed store, hash-verified

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

Callers 3

SocialShareFunction · 0.90
runTestFunction · 0.90
getShortLinkPropsFunction · 0.90

Calls

no outgoing calls

Tested by 1

runTestFunction · 0.72