@@ -24,7 +24,7 @@ $ npm i @sinuos/nestjs-notification
24
24
### Declare module
25
25
26
26
``` typescript
27
- import { NestjsNotificationModule } from ' @sinuos/nestjs-notify .module' ;
27
+ import { NestjsNotificationModule } from ' @sinuos/nestjs-notification .module' ;
28
28
29
29
@Module ({
30
30
imports: [NestjsNotificationModule .register ()],
@@ -36,10 +36,10 @@ export class AppModule {}
36
36
37
37
``` typescript
38
38
import { Injectable } from ' @nestjs/common' ;
39
- import { INestjsNotifyChannel } from ' @sinuos/nestjs-notify .service' ;
39
+ import { INestjsNotificationChannel } from ' @sinuos/nestjs-notification .service' ;
40
40
41
41
@Injectable ()
42
- export class NexmoChannel implements INestjsNotifyChannel {
42
+ export class NexmoChannel implements INestjsNotificationChannel {
43
43
constructor () {}
44
44
45
45
send(): Promise <any > {
@@ -51,9 +51,9 @@ export class NexmoChannel implements INestjsNotifyChannel {
51
51
### Notification
52
52
53
53
``` typescript
54
- import { NestJsNotify } from ' @sinuos/nestjs-notify .service' ;
54
+ import { NestJsNotification } from ' @sinuos/nestjs-notification .service' ;
55
55
56
- export class InvoicPaidNotification implements NestJsNotify {
56
+ export class InvoicPaidNotification implements NestJsNotification {
57
57
public sendToChannels() {
58
58
return [NexmoChannel ];
59
59
}
@@ -68,15 +68,15 @@ export class InvoicPaidNotification implements NestJsNotify {
68
68
69
69
``` typescript
70
70
import { Injectable } from ' @nestjs/common' ;
71
- import { NestjsNotificationService } from ' @sinuos/nestjs-notify .service' ;
71
+ import { NestjsNotificationService } from ' @sinuos/nestjs-notification .service' ;
72
72
73
73
@Injectable ()
74
74
export class AppService {
75
- constructor (private notify : NestjsNotificationService ) {}
75
+ constructor (private notification : NestjsNotificationService ) {}
76
76
77
- notify () {
77
+ notification () {
78
78
const notification = new InvoicePaidNotification ();
79
- this .notify .send (notification );
79
+ this .notification .send (notification );
80
80
}
81
81
}
82
82
```
0 commit comments