Compare commits

..

2 Commits

Author SHA1 Message Date
手瓜一十雪
da24ae7e1c fix: 空json5 2025-01-27 19:30:45 +08:00
Mlikiowa
8fc13f8a8f release: v4.4.13 2025-01-27 11:26:17 +00:00
4 changed files with 7 additions and 4 deletions

View File

@@ -4,7 +4,7 @@
"name": "NapCatQQ",
"slug": "NapCat.Framework",
"description": "高性能的 OneBot 11 协议实现",
"version": "4.4.12",
"version": "4.4.13",
"icon": "./logo.png",
"authors": [
{

View File

@@ -2,7 +2,7 @@
"name": "napcat",
"private": true,
"type": "module",
"version": "4.4.12",
"version": "4.4.13",
"scripts": {
"build:universal": "npm run build:webui && vite build --mode universal || exit 1",
"build:framework": "npm run build:webui && vite build --mode framework || exit 1",

View File

@@ -1 +1 @@
export const napCatVersion = '4.4.12';
export const napCatVersion = '4.4.13';

View File

@@ -59,12 +59,15 @@ export class OB11HttpServerAdapter extends IOB11NetworkAdapter<HttpServerConfig>
});
req.on('end', () => {
try {
req.body = json5.parse(rawData);
req.body = json5.parse(rawData || '{}');
next();
} catch (err) {
return res.status(400).send('Invalid JSON');
}
});
req.on('error', (err) => {
return res.status(400).send('Invalid JSON');
});
});
this.app.use((req, res, next) => this.authorize(this.config.token, req, res, next));