Spaces:
Sleeping
Sleeping
Download src/modules/webhook/webhook.module.ts from jinksQspider/openWa: direct link, hf CLI and curl.
- Browser
- Download file 967 Bytes
-
https://huggingface.co/spaces/jinksQspider/openWa/resolve/main/src/modules/webhook/webhook.module.ts
- Command line
-
hf download hf://spaces/jinksQspider/openWa/src/modules/webhook/webhook.module.ts
-
curl -L -o webhook.module.ts https://huggingface.co/spaces/jinksQspider/openWa/resolve/main/src/modules/webhook/webhook.module.ts
967 Bytes
| import { Module, DynamicModule, Type } from '@nestjs/common'; | |
| import { TypeOrmModule } from '@nestjs/typeorm'; | |
| import { Webhook } from './entities/webhook.entity'; | |
| import { WebhookService } from './webhook.service'; | |
| import { WebhookController } from './webhook.controller'; | |
| import { WebhooksListController } from './webhooks-list.controller'; | |
| // Only import QueueModule if explicitly enabled to avoid Redis connection errors | |
| const queueModules: Array<Type | DynamicModule> = []; | |
| if (process.env.QUEUE_ENABLED === 'true') { | |
| // eslint-disable-next-line @typescript-eslint/no-require-imports | |
| const queueModule = require('../queue/queue.module') as { | |
| QueueModule: Type; | |
| }; | |
| queueModules.push(queueModule.QueueModule); | |
| } | |
| ({ | |
| imports: [TypeOrmModule.forFeature([Webhook], 'data'), ...queueModules], | |
| controllers: [WebhookController, WebhooksListController], | |
| providers: [WebhookService], | |
| exports: [WebhookService], | |
| }) | |
| export class WebhookModule {} | |