Артем Леванов
first commit
41a71fd
raw
history blame contribute delete
275 Bytes
import { PostType } from '../model/types/post';
import { $api } from '@/shared/api/axiosInstance';
type FetchPostsResponse = PostType[];
export const fetchPosts = async () => {
const { data } = await $api.get<FetchPostsResponse>(`/posts?limit=5`);
return data;
};