Last active
March 16, 2020 14:21
-
-
Save kluu1/2b1f8dbb59b1e7562ea7fd59b1f5b704 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import request from 'superagent'; | |
| ... | |
| const getCustomer = async (id) => { | |
| try { | |
| const response = await request | |
| .get(`${process.env.CUSTOMERS_ENDPOINT}/customer/${id}`) | |
| .set('Authorization', this.$store.state.idToken) | |
| this.customers = response.body.userProfiles; | |
| this.page = response.body.currentPage; | |
| this.maxPages = response.body.totalPages; | |
| } catch (error) { | |
| this.$config.showError(error); | |
| } | |
| } | |
| ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment