mirror of
https://github.com/upstash/context7.git
synced 2025-12-02 01:50:09 +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> {
|
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;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user