File size: 444 Bytes
41a71fd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { $api } from '@/shared/api/axiosInstance';

type Update{{sliceName}}Props = {
    {{lowerCase sliceName}}_id: number;
    user_id: number;
};

type Update{{sliceName}}Response = {
    status: number;
    message: string;
};

export const update{{sliceName}} = async (props: Update{{sliceName}}Props) => {
    const { data } = await $api.post<Update{{sliceName}}Response>(`/{{lowerCase sliceName}}s/update`, props);

    return data;
};