Update API endpoint from /projects to /libraries for project fetching

This commit is contained in:
Abdusshh 2025-04-13 19:42:23 +03:00
parent 2429b67e7a
commit 500d19349d

View File

@ -8,7 +8,7 @@ const CONTEXT7_BASE_URL = "https://context7.com";
*/ */
export async function fetchProjects(): Promise<Project[] | null> { export async function fetchProjects(): Promise<Project[] | null> {
try { try {
const response = await fetch(`${CONTEXT7_BASE_URL}/api/projects`); const response = await fetch(`${CONTEXT7_BASE_URL}/api/libraries`);
if (!response.ok) { if (!response.ok) {
console.error(`Failed to fetch projects: ${response.status}`); console.error(`Failed to fetch projects: ${response.status}`);
return null; return null;