File size: 350 Bytes
41a71fd
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
import { {{sliceName}}Type } from '../model/types/{{lowerCase sliceName}}';
import { $api } from '@/shared/api/axiosInstance';

type Fetch{{sliceName}}sResponse = {{sliceName}}Type[];

export const fetch{{sliceName}}s = async () => {
    const { data } = await $api.get<Fetch{{sliceName}}sResponse>(`/{{lowerCase sliceName}}s`);

    return data;
};