a mini social media app for small communities
1const search_posts = async (query, limit, offset) => {
2 const data = await fetch(`/api/post/search?query=${query}&limit=${limit}&offset=${offset}`, {
3 method: 'GET'
4 })
5 const json = await data.json()
6 return json
7}
8
9const search_users = async (query, limit, offset) => {
10 const data = await fetch(`/api/user/search?query=${query}&limit=${limit}&offset=${offset}`, {
11 method: 'GET'
12 })
13 const json = await data.json()
14 return json
15}