mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Use default middleware for parsing request body
This commit is contained in:
@ -9,7 +9,6 @@ import sanitize from 'sanitize-filename';
|
||||
import { sync as writeFileAtomicSync } from 'write-file-atomic';
|
||||
|
||||
import { getConfigValue, color } from '../util.js';
|
||||
import { jsonParser } from '../express-common.js';
|
||||
import { write } from '../character-card-parser.js';
|
||||
|
||||
const contentDirectory = path.join(process.cwd(), 'default/content');
|
||||
@ -627,7 +626,7 @@ function isHostWhitelisted(host) {
|
||||
|
||||
export const router = express.Router();
|
||||
|
||||
router.post('/importURL', jsonParser, async (request, response) => {
|
||||
router.post('/importURL', async (request, response) => {
|
||||
if (!request.body.url) {
|
||||
return response.sendStatus(400);
|
||||
}
|
||||
@ -713,7 +712,7 @@ router.post('/importURL', jsonParser, async (request, response) => {
|
||||
}
|
||||
});
|
||||
|
||||
router.post('/importUUID', jsonParser, async (request, response) => {
|
||||
router.post('/importUUID', async (request, response) => {
|
||||
if (!request.body.url) {
|
||||
return response.sendStatus(400);
|
||||
}
|
||||
|
Reference in New Issue
Block a user