Untitled
unknown
plain_text
2 years ago
695 B
3
Indexable
Never
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; };