Untitled
unknown
plain_text
3 years ago
695 B
12
Indexable
import { FetchedLogginedUserDataType } from '@/types/global/fetchedLogginedUserData.type';
import api from '@/services/apiServcie';
import { AxiosResponse } from 'axios';
type AxiosResponseType = FetchedLogginedUserDataType;
export const APIfetchLogginedUserData = async (
token: string | undefined,
phoneNumber: string | undefined,
): Promise<AxiosResponseType> => {
const { data }: AxiosResponse<AxiosResponseType> = await api.post(
'/lastCheckout',
{
userID: phoneNumber,
pass: '',
},
{
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${token}`,
},
},
);
return data;
};
Editor is loading...