[core] Add /ping

This commit is contained in:
devlikepro committed 2024-08-04 10:07:08 +07:00
1 parent b71567c754
commit 52ef8e8b76
3 files changed
+18

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
import { Controller, Get } from '@nestjs/common';
import { ApiOperation, ApiTags } from '@nestjs/swagger';
import { PingResponse } from '@waha/structures/ping.dto';
@Controller('ping')
@ApiTags('other')
export class PingController {
@Get()
@ApiOperation({ summary: 'Ping the server, perform no operations.' })
ping(): PingResponse {
return { message: 'pong' };
}
}
+2
View File
@@ -18,6 +18,7 @@ import { ChattingController } from '../api/chatting.controller';
import { ContactsController } from '../api/contacts.controller';
import { GroupsController } from '../api/groups.controller';
import { HealthController } from '../api/health.controller';
import { PingController } from '../api/ping.controller';
import { PresenceController } from '../api/presence.controller';
import { ScreenshotController } from '../api/screenshot.controller';
import {
@@ -105,6 +106,7 @@ export const CONTROLLERS = [
ScreenshotController,
VersionController,
HealthController,
PingController,
];
const PROVIDERS = [
{
+3
View File
@@ -0,0 +1,3 @@
export class PingResponse {
message: string = 'pong';
}