From 38a02894c1ce4e77d9cd7b9cb128f56c34a86906 Mon Sep 17 00:00:00 2001 From: duysolo Date: Sat, 19 Nov 2022 23:25:06 +0700 Subject: [PATCH] update docs --- README.MD | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/README.MD b/README.MD index 8559caf..1905c2c 100644 --- a/README.MD +++ b/README.MD @@ -522,7 +522,20 @@ curl --request POST \ classes. `@InjectPasswordHasher()`: inject `PasswordHasherService` to your injectable -classes. +classes. This is an alias for the statement below: + +```typescript +import { Inject, Injectable } from '@nestjs/common' +import { AUTH_PASSWORD_HASHER } from '@mercury-labs/nest-auth' + +@Injectable() +export class SampleService { + public constructor( + @Inject(AUTH_PASSWORD_HASHER) + protected readonly hasher: PasswordHasherService + ) {} +} +``` ### Controller Decorators