Created
May 17, 2021 23:13
-
-
Save charles-dr/04d8bd4b274a2fa8f815ad77a30879b5 to your computer and use it in GitHub Desktop.
my first gist
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 Axios from './index' | |
const ROUTES = { | |
GET_LESSONS: '/lessons' | |
} | |
export const getLessons = async ({ page = 0 }) => { | |
const response = await Axios.get(ROUTES.GET_LESSONS, { | |
params: { | |
page: page | |
} | |
}) | |
.then(response => { | |
return response | |
}) | |
.catch(error => { | |
throw error | |
}) | |
return response | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment