mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-07-19 12:03:37 +00:00
fix: #761
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
import { OB11EmitEventContent, OB11NetworkReloadType } from './index';
|
import { OB11EmitEventContent, OB11NetworkReloadType } from './index';
|
||||||
import express, { Express, NextFunction, Request, Response } from 'express';
|
import express, { Express, NextFunction, Request, Response } from 'express';
|
||||||
import http from 'http';
|
import http from 'http';
|
||||||
import { NapCatCore } from '@/core';
|
import { NapCatCore } from '@/core';
|
||||||
@@ -60,7 +60,7 @@ export class OB11HttpServerAdapter extends IOB11NetworkAdapter<HttpServerConfig>
|
|||||||
});
|
});
|
||||||
req.on('end', () => {
|
req.on('end', () => {
|
||||||
try {
|
try {
|
||||||
req.body = json5.parse(rawData || '{}');
|
req.body = { ...json5.parse(rawData || '{}'), ...req.body };
|
||||||
next();
|
next();
|
||||||
} catch {
|
} catch {
|
||||||
return res.status(400).send('Invalid JSON');
|
return res.status(400).send('Invalid JSON');
|
||||||
|
Reference in New Issue
Block a user