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",
|
"name": "NapCatQQ",
|
||||||
"slug": "NapCat.Framework",
|
"slug": "NapCat.Framework",
|
||||||
"description": "高性能的 OneBot 11 协议实现",
|
"description": "高性能的 OneBot 11 协议实现",
|
||||||
"version": "4.4.12",
|
"version": "4.4.13",
|
||||||
"icon": "./logo.png",
|
"icon": "./logo.png",
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
"name": "napcat",
|
"name": "napcat",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "4.4.12",
|
"version": "4.4.13",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build:universal": "npm run build:webui && vite build --mode universal || exit 1",
|
"build:universal": "npm run build:webui && vite build --mode universal || exit 1",
|
||||||
"build:framework": "npm run build:webui && vite build --mode framework || 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', () => {
|
req.on('end', () => {
|
||||||
try {
|
try {
|
||||||
req.body = json5.parse(rawData);
|
req.body = json5.parse(rawData || '{}');
|
||||||
next();
|
next();
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
return res.status(400).send('Invalid JSON');
|
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));
|
this.app.use((req, res, next) => this.authorize(this.config.token, req, res, next));
|
||||||
|
Reference in New Issue
Block a user