Branchwell

AI Resource Pro / website · airesourcepro.com / lib / api.ts

Raw 359 B on 6c7ce85c3441baadd17890ab9cc9bf8ed5112901
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