Last active
October 26, 2017 20:35
-
-
Save brybrophy/e6d8eddca2cd5923b9137c4d9bfa4ec1 to your computer and use it in GitHub Desktop.
This file contains 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 baseApi from './api'; | |
import { displayUserFeedback } from './utils'; | |
export async function handleClickGetAllUsers() { | |
try { | |
return await baseApi.users.getAll(); | |
} catch () { | |
displayUserFeedback('There was an error retrieving the users.'); | |
} | |
} | |
export async function handleClickGetOneUser(userId) { | |
try { | |
return await baseApi.users.getOne(userId); | |
} catch () { | |
displayUserFeedback('There was an error retrieving the users.'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment