mirror of
https://github.com/upstash/context7.git
synced 2025-12-01 09:31:58 +00:00
Update API endpoint from /projects to /libraries for project fetching
This commit is contained in:
parent
2429b67e7a
commit
500d19349d
@ -8,7 +8,7 @@ const CONTEXT7_BASE_URL = "https://context7.com";
|
||||
*/
|
||||
export async function fetchProjects(): Promise<Project[] | null> {
|
||||
try {
|
||||
const response = await fetch(`${CONTEXT7_BASE_URL}/api/projects`);
|
||||
const response = await fetch(`${CONTEXT7_BASE_URL}/api/libraries`);
|
||||
if (!response.ok) {
|
||||
console.error(`Failed to fetch projects: ${response.status}`);
|
||||
return null;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user