From d2afa54301bcdd6a40fe5116b8191196c9b7bb33 Mon Sep 17 00:00:00 2001 From: moonrailgun Date: Mon, 9 Sep 2024 21:29:12 +0800 Subject: [PATCH] feat: add unknown integration log --- src/server/trpc/routers/feed/integration.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/server/trpc/routers/feed/integration.ts b/src/server/trpc/routers/feed/integration.ts index 3df0f1d..29f96a1 100644 --- a/src/server/trpc/routers/feed/integration.ts +++ b/src/server/trpc/routers/feed/integration.ts @@ -143,6 +143,8 @@ export const feedIntegrationRouter = router({ } } + logUnknownIntegration('github', input); + return 'Not supported yet'; }), tencentCloudAlarm: publicProcedure @@ -233,6 +235,8 @@ export const feedIntegrationRouter = router({ return 'ok'; } + logUnknownIntegration('tencentCloudAlarm', input); + return 'Not supported yet'; }), sentry: publicProcedure @@ -300,6 +304,8 @@ export const feedIntegrationRouter = router({ return 'ok'; } + logUnknownIntegration('sentry', input); + return 'Not supported yet'; }), }); @@ -314,3 +320,7 @@ export function buildFeedPublicOpenapi(meta: OpenApiMetaInfo): OpenApiMeta { }, }; } + +function logUnknownIntegration(source: string, input: any) { + logger.info(`[Feed Unknown Integration] ${source}: ${JSON.stringify(input)}`); +}