mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-07-19 12:03:37 +00:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
da24ae7e1c | ||
![]() |
8fc13f8a8f |
@@ -4,7 +4,7 @@
|
||||
"name": "NapCatQQ",
|
||||
"slug": "NapCat.Framework",
|
||||
"description": "高性能的 OneBot 11 协议实现",
|
||||
"version": "4.4.12",
|
||||
"version": "4.4.13",
|
||||
"icon": "./logo.png",
|
||||
"authors": [
|
||||
{
|
||||
|
@@ -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",
|
||||
|
@@ -1 +1 @@
|
||||
export const napCatVersion = '4.4.12';
|
||||
export const napCatVersion = '4.4.13';
|
||||
|
@@ -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));
|
||||
|
Reference in New Issue
Block a user