From 8edbe54456362fa4d1e15d10c57823abb27d5368 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=8B=E7=93=9C=E4=B8=80=E5=8D=81=E9=9B=AA?= Date: Thu, 21 Nov 2024 11:25:06 +0800 Subject: [PATCH] fix: index --- src/onebot/network/passive-http.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/onebot/network/passive-http.ts b/src/onebot/network/passive-http.ts index 08f47cd7..e6d75924 100644 --- a/src/onebot/network/passive-http.ts +++ b/src/onebot/network/passive-http.ts @@ -99,7 +99,11 @@ export class OB11PassiveHttpAdapter implements IOB11NetworkAdapter { } else if (req.query) { payload = { ...req.query, ...req.body }; } - + if (req.path === '' || req.path === '/') { + const hello = OB11Response.ok({}); + hello.message = 'NapCat4 Ss Running'; + return res.json(hello) + } const actionName = req.path.split('/')[1]; const action = this.actions.get(actionName); if (action) {