From fec2d1c96dab52626daa5ae9dd54d37d0a33a0cb Mon Sep 17 00:00:00 2001 From: Jerryplusy Date: Mon, 8 Dec 2025 21:36:41 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(systemWeb.controller.ts):=20ad?= =?UTF-8?q?d=20ping=20endpoint=20for=20server=20health=20check=20response?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/system/systemWeb.controller.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/modules/system/systemWeb.controller.ts b/src/modules/system/systemWeb.controller.ts index 8e85671..d7ad178 100644 --- a/src/modules/system/systemWeb.controller.ts +++ b/src/modules/system/systemWeb.controller.ts @@ -1,4 +1,4 @@ -import { Controller, Post, Inject, UseGuards } from '@nestjs/common'; +import { Controller, Post, Get, Inject, UseGuards } from '@nestjs/common'; import { ApiTags, ApiOperation, ApiBody, ApiHeader } from '@nestjs/swagger'; import { SystemWebService } from './systemWeb.service'; import { TokenAuthGuard } from '../../core/tools/token-auth.guard'; @@ -53,4 +53,16 @@ export class SystemWebController { public async getRestartTime(): Promise { return await this.systemService.getRestartTime(); } + + /** + * Ping接口 + */ + @Get('ping') + @ApiOperation({ + summary: 'Ping测试', + description: '嗨,服务器没事', + }) + public async ping(): Promise { + return 'pong'; + } }