提供 gieea webhooks (#2)
chore: debug log 仅输出app的log fix(commons): fix sanitize not return value. feat(webhooks): add gitea webhooks api. Co-authored-by: Ivan Li <ivanli@live.cn> Co-authored-by: Ivan <ivanli@live.cn> Reviewed-on: #2 Co-Authored-By: Ivan Li <ivan@noreply.%(DOMAIN)s> Co-Committed-By: Ivan Li <ivan@noreply.%(DOMAIN)s>
This commit is contained in:
20
src/webhooks/webhooks.module.ts
Normal file
20
src/webhooks/webhooks.module.ts
Normal file
@ -0,0 +1,20 @@
|
||||
import { MiddlewareConsumer, Module } from '@nestjs/common';
|
||||
import { TypeOrmModule } from '@nestjs/typeorm';
|
||||
import { PipelineTasksModule } from '../pipeline-tasks/pipeline-tasks.module';
|
||||
import { GiteaWebhooksController } from './gitea-webhooks.controller';
|
||||
import { WebhookLog } from './webhook-log.entity';
|
||||
import { WebhooksService } from './webhooks.service';
|
||||
import { raw } from 'body-parser';
|
||||
|
||||
@Module({
|
||||
imports: [TypeOrmModule.forFeature([WebhookLog]), PipelineTasksModule],
|
||||
controllers: [GiteaWebhooksController],
|
||||
providers: [WebhooksService],
|
||||
})
|
||||
export class WebhooksModule {
|
||||
// configure(consumer: MiddlewareConsumer) {
|
||||
// consumer
|
||||
// .apply(raw({ type: 'application/json' }))
|
||||
// .forRoutes(GiteaWebhooksController);
|
||||
// }
|
||||
}
|
Reference in New Issue
Block a user