From 97ef58f55480f78754568541537e3733f7a9a919 Mon Sep 17 00:00:00 2001 From: Vinlic Date: Thu, 21 Mar 2024 11:52:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=94=AF=E6=8C=81ping?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/routes/index.ts | 4 +++- src/api/routes/ping.ts | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 src/api/routes/ping.ts diff --git a/src/api/routes/index.ts b/src/api/routes/index.ts index 0bf9ca9..2e44386 100644 --- a/src/api/routes/index.ts +++ b/src/api/routes/index.ts @@ -1,5 +1,7 @@ import chat from "./chat.ts"; +import ping from "./ping.ts"; export default [ - chat + chat, + ping ]; \ No newline at end of file diff --git a/src/api/routes/ping.ts b/src/api/routes/ping.ts new file mode 100644 index 0000000..dc9af72 --- /dev/null +++ b/src/api/routes/ping.ts @@ -0,0 +1,6 @@ +export default { + prefix: '/ping', + get: { + '': async () => "pong" + } +} \ No newline at end of file