nord vpnnord vpn
Ad

Untitled

mail@pastecode.io avatar
unknown
tsx
7 months ago
807 B
1
Indexable
Never
axios.defaults.baseURL = 'https://rebox.ir';

const api = {
  get: axios.get,
  post: axios.post,
};

// --------------------

import api from '@/services/apiServcie';
import { BuyRecordOrderType } from '@/types/routes/profile/global/buyRecordOrder.type';
import { AxiosResponse } from 'axios';

type AxiosResponseType = BuyRecordOrderType[];

export const APIfetchBuyRecordOrders = async (args: {
  token: string | undefined;
  phoneNumber: string;
}): Promise<AxiosResponseType> => {
  const { data }: AxiosResponse<AxiosResponseType> = await api.post(
    '/purchaseOrders',
    { customerid: args.phoneNumber, sell: 1 },
    {
      headers: {
        'Content-Type': 'application/json',
        Authorization: `Bearer ${args.token}`,
      },
    },
  );
  return data;
};

nord vpnnord vpn
Ad