mirror of
https://github.com/crystelf/crystelf-core.git
synced 2026-01-29 03:47:27 +00:00
✨ feat(systemWeb.controller.ts): add ping endpoint for server health check response
This commit is contained in:
parent
741527410c
commit
fec2d1c96d
@ -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<string> {
|
||||
return await this.systemService.getRestartTime();
|
||||
}
|
||||
|
||||
/**
|
||||
* Ping接口
|
||||
*/
|
||||
@Get('ping')
|
||||
@ApiOperation({
|
||||
summary: 'Ping测试',
|
||||
description: '嗨,服务器没事',
|
||||
})
|
||||
public async ping(): Promise<string> {
|
||||
return 'pong';
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user