This commit is contained in:
jane 2021-06-06 01:20:06 -04:00
parent a5c89496b1
commit be6cdceeea
1 changed files with 2 additions and 2 deletions

View File

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