update request limit stuff
This commit is contained in:
parent
6ac2cb8456
commit
14f958041f
@ -16,8 +16,8 @@ import { webuiRouter } from "@/src/routes/webui";
|
||||
const app = express();
|
||||
|
||||
app.use(bodyParser.raw());
|
||||
app.use(express.json());
|
||||
app.use(bodyParser.text({ limit: "4mb" }));
|
||||
app.use(express.json({ limit: "4mb" }));
|
||||
app.use(bodyParser.text());
|
||||
app.use(requestLogger);
|
||||
|
||||
app.use("/api", apiRouter);
|
||||
|
@ -7,7 +7,7 @@ import { RequestHandler } from "express";
|
||||
|
||||
export const importController: RequestHandler = async (req, res) => {
|
||||
const accountId = await getAccountIdForRequest(req);
|
||||
const request = JSON.parse(String(req.body)) as IImportRequest;
|
||||
const request = req.body as IImportRequest;
|
||||
|
||||
const inventory = await getInventory(accountId);
|
||||
importInventory(inventory, request.inventory);
|
||||
|
@ -1094,7 +1094,7 @@ function doImport() {
|
||||
revalidateAuthz(() => {
|
||||
$.post({
|
||||
url: "/custom/import?" + window.authz,
|
||||
contentType: "text/plain",
|
||||
contentType: "application/json",
|
||||
data: JSON.stringify({
|
||||
inventory: JSON.parse($("#import-inventory").val())
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user