Last active
September 6, 2019 19:09
-
-
Save vidhill/4bfc9adb3644ee0d07c76d497c6583e2 to your computer and use it in GitHub Desktop.
Please avoid this pattern
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 { someApiCall } from './' | |
const myService = async function(parameter, passedObject) { | |
const restResponse = await someRestCall(parameter); | |
passedObject.details = restResponse[0]; | |
return { | |
content: restResponse.foo, | |
id: restResponse.bar, | |
passedObject | |
} | |
} | |
export default myService; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment