this beef is fucking raw

This commit is contained in:
jane 2021-06-06 02:08:07 -04:00
parent d36de0f273
commit f307e37519
1 changed files with 2 additions and 4 deletions

View File

@ -59,9 +59,7 @@ app.get("/indexes/:project(\\w+)", (req, res) => {
} }
}); });
app.use(express.json()); app.use(express.raw());
// app.use(express.urlencoded());
// app.use(express.text());
function diff(current, checked) { function diff(current, checked) {
let lines_current = current.split('\n').map(l => l.trim()).filter(l => l != ""); let lines_current = current.split('\n').map(l => l.trim()).filter(l => l != "");
@ -116,7 +114,7 @@ function diff(current, checked) {
app.post("/updates/:project(\\w+)", (req, res) => { app.post("/updates/:project(\\w+)", (req, res) => {
let project_id = req.params['project']; let project_id = req.params['project'];
const body = typeof req.body == "string" ? req.body : Object.keys(req.body)[0]; const body = req.body || "";
console.log(req.body); console.log(req.body);
console.log(`${req.body}, ${typeof req.body}`); console.log(`${req.body}, ${typeof req.body}`);
console.log(`${body}`); console.log(`${body}`);