Skip to content

Commit 6349985

Browse files
committedFeb 25, 2025
subscriptions.module
1 parent 37541f9 commit 6349985

File tree

6 files changed

+42
-10
lines changed

6 files changed

+42
-10
lines changed
 

‎package-lock.json

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎smart-app-launch-subscriptions/back/src/modules/app.module.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import { Module } from '@nestjs/common'
22
import { EventsModule } from './events/events.module'
3+
import { SubscriptionsModule } from './subscriptions/subscriptions.module'
34

45
@Module({
56
imports: [
6-
EventsModule
7+
EventsModule,
8+
SubscriptionsModule
79
]
810
})
911

‎smart-app-launch-subscriptions/back/src/modules/events/events.controller.ts

+1-9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Controller, Get, Post, Sse } from '@nestjs/common'
1+
import { Controller, Get, Sse } from '@nestjs/common'
22
import { MessageEvent } from '@nestjs/common'
33
import { Subject } from 'rxjs'
44

@@ -27,12 +27,4 @@ export class EventsController {
2727
date: new Date().toISOString()
2828
})
2929
}
30-
31-
@Post('aendpointforaidbox')
32-
async testnotif1() {
33-
return this.sendMessage({
34-
msg: 'test',
35-
date: new Date().toISOString()
36-
})
37-
}
3830
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { Controller, Post } from '@nestjs/common'
2+
import { SubscriptionsService } from './subscriptions.service'
3+
4+
@Controller('subscriptions')
5+
export class SubscriptionsController {
6+
7+
private subscriptionsService: SubscriptionsService
8+
9+
@Post('webhook-to-post-all-new-subscriptions-aidbox')
10+
async postAllNewSubscriptionEvents() {
11+
return await this.subscriptionsService.postAllNewSubscriptionEvents()
12+
}
13+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { Module } from '@nestjs/common'
2+
import { ConfigModule } from '@nestjs/config'
3+
import { SubscriptionsService } from './subscriptions.service'
4+
import { SubscriptionsController } from './subscriptions.controller'
5+
6+
@Module({
7+
imports: [ConfigModule.forRoot()],
8+
providers: [SubscriptionsService],
9+
controllers: [SubscriptionsController],
10+
})
11+
export class SubscriptionsModule { }
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { Injectable } from '@nestjs/common'
2+
3+
@Injectable()
4+
export class SubscriptionsService {
5+
async postAllNewSubscriptionEvents() {
6+
return []
7+
}
8+
}

0 commit comments

Comments
 (0)
Please sign in to comment.