MCPcopy Create free account
hub / github.com/TanStack/router / fetchPosts

Function fetchPosts

e2e/solid-router/basic/src/posts.ts:17–22  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15}
16
17export const fetchPosts = async () => {
18 console.info('Fetching posts...')
19 return axios
20 .get<Array<PostType>>(`${queryURL}/posts`)
21 .then((r) => r.data.slice(0, 10))
22}
23
24export const fetchPost = async (postId: string) => {
25 console.info(`Fetching post with id ${postId}...`)

Callers 1

main.tsxFile · 0.90

Calls 3

infoMethod · 0.65
thenMethod · 0.65
getMethod · 0.65

Tested by

no test coverage detected