Branchwell

AI Resource Pro / website / lib / api.ts

1export async function getTools() {
2 const res = await fetch('/api/tools')
3 if (!res.ok) throw new Error('Failed to fetch tools')
4 return res.json()
5}
6
7export async function getCategories() {
8 const res = await fetch('/api/categories')
9 if (!res.ok) throw new Error('Failed to fetch categories')
10 return res.json()
11}
12
13// Add more API utilities as needed