mirror of
https://github.com/LLOneBot/LLOneBot.git
synced 2024-11-22 01:56:33 +00:00
fix: body too large
This commit is contained in:
parent
0c131ff555
commit
bffa2d9a31
@ -4,7 +4,7 @@
|
||||
"name": "LLOneBot",
|
||||
"slug": "LLOneBot",
|
||||
"description": "LiteLoaderQQNT的OneBotApi",
|
||||
"version": "1.2.1",
|
||||
"version": "1.2.2",
|
||||
"thumbnail": "./icon.png",
|
||||
"author": {
|
||||
"name": "linyuchen",
|
||||
|
@ -1,11 +1,15 @@
|
||||
import {sendIPCRecallQQMsg, sendIPCSendQQMsg} from "./IPCSend";
|
||||
|
||||
const express = require("express");
|
||||
const bodyParser = require('body-parser');
|
||||
import {OnebotGroupMemberRole, PostDataAction, PostDataSendMsg} from "../common/types";
|
||||
import {friends, groups, selfInfo} from "./data";
|
||||
|
||||
function handlePost(jsonData: any) {
|
||||
jsonData.params = jsonData;
|
||||
if (!jsonData.params) {
|
||||
jsonData.params = jsonData
|
||||
|
||||
}
|
||||
let resData = {
|
||||
status: 0,
|
||||
retcode: 0,
|
||||
@ -93,7 +97,8 @@ function handlePost(jsonData: any) {
|
||||
export function startExpress(port: number) {
|
||||
const app = express();
|
||||
// 中间件,用于解析POST请求的请求体
|
||||
app.use(express.urlencoded({extended: true}));
|
||||
app.use(express.urlencoded({extended: true, limit: "50mb"}));
|
||||
app.use(bodyParser({limit: '50mb'}))
|
||||
app.use(express.json());
|
||||
|
||||
function parseToOnebot12(action: PostDataAction) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user