this is hurting my brain

This commit is contained in:
jane 2021-06-06 02:15:21 -04:00
parent 8ad4fb3a80
commit 5aa147a373
1 changed files with 2 additions and 6 deletions

View File

@ -58,10 +58,6 @@ app.get("/indexes/:project(\\w+)", (req, res) => {
res.sendStatus(404); res.sendStatus(404);
} }
}); });
app.use((req, res, next) => {
console.log(req);
next();
})
app.use(express.urlencoded({ extended: false })); app.use(express.urlencoded({ extended: false }));
function diff(current, checked) { function diff(current, checked) {
@ -117,8 +113,8 @@ 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 = req.rawBody || ""; const body = String(Object.keys(req.body)[0]);
console.log(req.rawBody); console.log(req.body);
console.log(`${req.body}, ${typeof req.body}`); console.log(`${req.body}, ${typeof req.body}`);
console.log(`${body}`); console.log(`${body}`);
let adjustedBody = body.replace(/\r/, ""); let adjustedBody = body.replace(/\r/, "");