Skip to content

Commit 21845c9

Browse files
authored
docs: fix wrong function name
Fix wrong name of method compare to the screenshot ## PR Checklist Please check if your PR fulfills the following requirements: - [x] The commit message follows our guidelines: https://github.com/nestjs/docs.nestjs.com/blob/master/CONTRIBUTING.md ## PR Type What kind of change does this PR introduce? <!-- Please check the one that applies to this PR using "x". --> - [ ] Bugfix - [ ] Feature - [ ] Code style update (formatting, local variables) - [ ] Refactoring (no functional changes, no api changes) - [ ] Build related changes - [x] Docs - [ ] Other... Please describe: ## What is the current behavior? Issue with the documentation. Issue Number: N/A ## What is the new behavior? Fix documentation ## Does this PR introduce a breaking change? - [ ] Yes - [x] No <!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. --> ## Other information
1 parent 6e46091 commit 21845c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/security/authorization.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,4 +428,4 @@ findAll() {
428428
}
429429
```
430430

431-
> warning **Notice** Since we must instantiate the policy handler in-place using the `new` keyword, `CreateArticlePolicyHandler` class cannot use the Dependency Injection. This can be addressed with the `ModuleRef#get` method (read more [here](/fundamentals/module-ref)). Basically, instead of registering functions and instances through the `@CheckPolicies()` decorator, you must allow passing a `Type<IPolicyHandler>`. Then, inside your guard, you could retrieve an instance using a type reference: `moduleRef.get(YOUR_HANDLER_TYPE)` or even dynamically instantiate it using the `ModuleRef#create` method.
431+
> warning **Notice** Since we must instantiate the policy handler in-place using the `new` keyword, `ReadArticlePolicyHandler` class cannot use the Dependency Injection. This can be addressed with the `ModuleRef#get` method (read more [here](/fundamentals/module-ref)). Basically, instead of registering functions and instances through the `@CheckPolicies()` decorator, you must allow passing a `Type<IPolicyHandler>`. Then, inside your guard, you could retrieve an instance using a type reference: `moduleRef.get(YOUR_HANDLER_TYPE)` or even dynamically instantiate it using the `ModuleRef#create` method.

0 commit comments

Comments
 (0)