init
This commit is contained in:
7
api/endpoints/getPosts.ts
Normal file
7
api/endpoints/getPosts.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { httpClient } from '../httpClient'
|
||||
|
||||
export const getPosts = (search: string) =>
|
||||
httpClient<Posts>('/api/posts', {
|
||||
method: 'GET',
|
||||
query: { search },
|
||||
})
|
||||
4
api/endpoints/getUsers.ts
Normal file
4
api/endpoints/getUsers.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
import { httpClient } from '../httpClient'
|
||||
|
||||
export const getUsers = () =>
|
||||
httpClient<Users>('/api/users')
|
||||
2
api/endpoints/index.ts
Normal file
2
api/endpoints/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
export * from './getPosts'
|
||||
export * from './getUsers'
|
||||
Reference in New Issue
Block a user