Open History to see the last commit
1import type { ProjectsPage } from './types'
2β
3export const projectsAPI = {
4 getProjects: async (cursor: number): Promise<ProjectsPage> => {
5 const response = await fetch(`/api/projects?cursor=${cursor}`)
6 if (!response.ok) throw new Error('Failed to fetch projects')
7 return await response.json()
8 },
9}