From 49384e9e4e93b185f849f9170308641034224e3d Mon Sep 17 00:00:00 2001 From: Jiri Spac Date: Wed, 17 Apr 2019 13:17:42 +0200 Subject: [PATCH] correct the @After hook example as it was before it was a bit confusing --- docs/explore/hooks/before-and-after.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/explore/hooks/before-and-after.md b/docs/explore/hooks/before-and-after.md index a9f1afd..9d7efdc 100644 --- a/docs/explore/hooks/before-and-after.md +++ b/docs/explore/hooks/before-and-after.md @@ -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);