({ limit = 8 }: { limit?: number } = {})
| 296 | } |
| 297 | |
| 298 | export async function getRecentMCPs({ limit = 8 }: { limit?: number } = {}) { |
| 299 | "use cache"; |
| 300 | cacheLife("hours"); |
| 301 | cacheTag("mcps"); |
| 302 | |
| 303 | const supabase = await createClient(); |
| 304 | const { data, error } = await supabase |
| 305 | .from("mcps") |
| 306 | .select("*") |
| 307 | .eq("active", true) |
| 308 | .order("created_at", { ascending: false }) |
| 309 | .limit(limit); |
| 310 | |
| 311 | return { data, error }; |
| 312 | } |
| 313 | |
| 314 | export async function getMCPBySlug(slug: string) { |
| 315 | "use cache"; |
nothing calls this directly
no test coverage detected