Branchwell

Become a Pro / website · becomeapro.ai / lib / api.ts

Raw 359 B on 5069836c1e4c4e369ebe86b13dc7d299c5bed8c0
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