This commit is contained in:
xiaojunnuo
2025-08-07 11:26:14 +08:00
parent cbe0b1c5a6
commit 5f4a89cecc
2 changed files with 40 additions and 14 deletions
@@ -1,4 +1,4 @@
import { Controller, Get, Inject, Provide } from '@midwayjs/core';
import {Body, Controller, Get, Inject, Post, Provide} from '@midwayjs/core';
import { BaseController, Constants, FileService, SysSettingsService, SysSiteInfo } from '@certd/lib-server';
import { http, logger } from '@certd/basic';
import { isComm } from '@certd/plus-core';
@@ -46,4 +46,10 @@ export class AppController extends BaseController {
this.ctx.response.redirect(redirect);
this.ctx.response.set('Cache-Control', 'public,max-age=25920');
}
@Post('/webhook', { summary: Constants.per.guest })
public async webhook( @Body() body: any) {
logger.info('webhook', JSON.stringify(body))
return this.ok("success")
}
}