Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save charles-dr/04d8bd4b274a2fa8f815ad77a30879b5 to your computer and use it in GitHub Desktop.
Save charles-dr/04d8bd4b274a2fa8f815ad77a30879b5 to your computer and use it in GitHub Desktop.
my first gist
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