UNPKG

lin3s-sylius-shop-api-client

Version:

JavaScript client on top of SyliusShopApiPlugin to build integrations with ease.

16 lines (12 loc) 361 B
import axios from 'axios'; import {authParams} from '../requestConfig'; export default config => () => { return new Promise((resolve, reject) => { const headers = { ...authParams(config), }; axios.get(`${config.baseUrl}/shop-api/me`, headers) .then(response => resolve(response.data)) .catch(error => reject(error)); }); };