this is hurting my brain

This commit is contained in:
jane 2021-06-06 02:15:21 -04:00
parent 8ad4fb3a80
commit 5aa147a373

View file

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