MCPcopy Create free account
hub / github.com/cursor/community-plugins / fetchCompanyProfile

Function fetchCompanyProfile

apps/cursor/src/data/queries.ts:111–127  ·  view source on GitHub ↗
(slug: string, userId?: string)

Source from the content-addressed store, hash-verified

109}
110
111async function fetchCompanyProfile(slug: string, userId?: string) {
112 const supabase = await createClient();
113 const query = supabase
114 .from("companies")
115 .select(
116 "id, name, slug, image, location, bio, website, social_x_link, hero, public, owner_id, created_at",
117 )
118 .eq("slug", slug);
119
120 if (userId) {
121 query.eq("owner_id", userId);
122 }
123
124 const { data, error } = await query.single();
125
126 return { data, error };
127}
128
129async function getPublicCompanyProfile(slug: string) {
130 "use cache";

Callers 2

getPublicCompanyProfileFunction · 0.85
getCompanyProfileFunction · 0.85

Calls 1

createClientFunction · 0.90

Tested by

no test coverage detected