Created
June 14, 2017 16:07
-
-
Save kyuwoo-choi/611998ae90bf957b37adf63377c71a19 to your computer and use it in GitHub Desktop.
hello world AOP example refactored
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
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' | |
}, | |
... | |
}); | |
} | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Where can we see the implementation for
Collection
? Thanks!