1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
import axios from 'axios';
import biteShipAPI from '../../../core/api/biteShip';
const GetRatesCourierBiteship = async ({ destination, items }) => {
const couriers = process.env.NEXT_PUBLIC_BITESHIP_CODE_COURIERS;
let body = {
...destination,
couriers:
'gojek, grab, deliveree, lalamove, jne, tiki, ninja, lion, rara, sicepat, jnt, pos, idexpress, rpx, wahana, jdl, pos, anteraja, sap, paxel, borzo',
items: items,
};
const response = await axios(
`${process.env.NEXT_PUBLIC_SELF_HOST}/api/biteship-service?method=POST&url=/v1/rates/couriers&body=` +
JSON.stringify(body)
);
// const featch = await biteShipAPI('POST', '/v1/rates/couriers', body);
// console.log('ini featch', response);
return response;
};
export default GetRatesCourierBiteship;
|