Skip to content

Instantly share code, notes, and snippets.

@vidhill
Last active September 6, 2019 19:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vidhill/4bfc9adb3644ee0d07c76d497c6583e2 to your computer and use it in GitHub Desktop.
Save vidhill/4bfc9adb3644ee0d07c76d497c6583e2 to your computer and use it in GitHub Desktop.
Please avoid this pattern
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