mirror of
https://github.com/certd/certd.git
synced 2026-06-12 12:17:31 +08:00
chore: format
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
import { BaseController, Constants } from '@certd/lib-server';
|
||||
import { Controller, Get, Inject, Param, Post, Provide } from '@midwayjs/core';
|
||||
import { PipelineService } from '../../modules/pipeline/service/pipeline-service.js';
|
||||
import { BaseController, Constants } from "@certd/lib-server";
|
||||
import { Controller, Get, Inject, Param, Post, Provide } from "@midwayjs/core";
|
||||
import { PipelineService } from "../../modules/pipeline/service/pipeline-service.js";
|
||||
|
||||
/**
|
||||
*/
|
||||
@Provide()
|
||||
@Controller('/api/webhook/')
|
||||
@Controller("/api/webhook/")
|
||||
export class WebhookController extends BaseController {
|
||||
@Inject()
|
||||
pipelineService: PipelineService;
|
||||
|
||||
@Get('/:webhookKey', { description: Constants.per.guest })
|
||||
@Post('/:webhookKey', { description: Constants.per.guest })
|
||||
async webhook(@Param('webhookKey') webhookKey: string): Promise<any> {
|
||||
@Get("/:webhookKey", { description: Constants.per.guest })
|
||||
@Post("/:webhookKey", { description: Constants.per.guest })
|
||||
async webhook(@Param("webhookKey") webhookKey: string): Promise<any> {
|
||||
await this.pipelineService.triggerByWebhook(webhookKey);
|
||||
return this.ok({});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user