Created
November 1, 2017 12:56
-
-
Save sadick254/3dc7c91fe9f22d8c54e6b577a3099aa6 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
| export const get = ({commit}, {url = '', params = {}, type = '', canCommit = true}) => { | |
| axios.get(url, { | |
| params | |
| }).then(resp => { | |
| if (canCommit) { | |
| commit(type, resp.data) | |
| } | |
| return resp.data | |
| }) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment