Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions docs/explore/hooks/before-and-after.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,8 @@ class Person {
@Field() id: number;

@Field()
@After(user => {
loggingService.sendLog(`User with id ${user.id} was removed`);
// note we could as well use `this` keyword like:
// loggingService.sendLog(`User with id ${this.id} was removed`);
@After(() => {
loggingService.sendLog(`User with id ${this.id} may have been removed(if it was found)`);
})
remove(): boolean {
const isDeleted = userService.removeById(this.id);
Expand Down