Module

Requests

Api request for working with cart API

View Source axios/cart/requests.js, line 1

Methods

# async inner fetchCartItems() → {array}

A function to fetch cart items from the database

View Source axios/cart/requests.js, line 28

items in cart

array

# inner fetchClearCart() → {Promise}

View Source axios/cart/requests.js, line 107

Promise object represents the response from the server

Promise

# inner fetchPoductUpdate(product) → {Promise}

Parameters:
Name Type Description
product object

View Source axios/cart/requests.js, line 97

Promise object represents the response from the server

Promise

# inner fetchProductRemoveFromCart(productId) → {Promise}

Parameters:
Name Type Description
productId string

View Source axios/cart/requests.js, line 87

Promise object represents the response from the server

Promise

# inner fetchProductToCart(product) → {Promise}

A function to add product to cart

Parameters:
Name Type Description
product object

View Source axios/cart/requests.js, line 76

Promise object represents the response from the server

Promise

# async inner fetchTestCartItems() → {Promise}

A function to fetch test cart items

View Source axios/cart/requests.js, line 51

Promise object respesents the response from the server

Promise

# inner withCredentials(productId) → {string}

A function to get proper url to connect to the database

Parameters:
Name Type Description
productId string

product id

View Source axios/cart/requests.js, line 12

url

string