Skip to content

Instantly share code, notes, and snippets.

@kyuwoo-choi
Created June 14, 2017 16:07
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 kyuwoo-choi/611998ae90bf957b37adf63377c71a19 to your computer and use it in GitHub Desktop.
Save kyuwoo-choi/611998ae90bf957b37adf63377c71a19 to your computer and use it in GitHub Desktop.
hello world AOP example refactored
class BookCollection extends Collection {
...
getNameByISBN(isbn) {
return this.get({
isbn: isbn
}, {
cache: true,
onSuccess: 'name'
onFail: null,
log: {
message: 'Retrieving Book {} - {} has been succeed',
params: ['isbn', 'name'],
level: 'info'
},
...
});
}
...
}
@tonix-tuft
Copy link

Where can we see the implementation for Collection? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment