remove body parser altogether
This commit is contained in:
parent
aed5b034a9
commit
3e36e1dd21
2 changed files with 1 additions and 8 deletions
2
index.js
2
index.js
|
@ -58,8 +58,6 @@ app.get("/indexes/:project(\\w+)", (req, res) => {
|
||||||
res.sendStatus(404);
|
res.sendStatus(404);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
app.use(express.urlencoded({ extended: false }));
|
|
||||||
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 != "");
|
||||||
|
|
|
@ -69,12 +69,7 @@ local function getAllFiles(program)
|
||||||
|
|
||||||
print("#DEBUG currentFiles " .. currentFiles)
|
print("#DEBUG currentFiles " .. currentFiles)
|
||||||
|
|
||||||
local updateResult = http.post(updateUrl, {
|
local updateResult = http.post(updateUrl, currentFiles)
|
||||||
content = currentFiles
|
|
||||||
}, {
|
|
||||||
["Content-Type"] = "text/plain",
|
|
||||||
["Content-Length"] = #currentFiles
|
|
||||||
})
|
|
||||||
if updateResult == nil then
|
if updateResult == nil then
|
||||||
print("error! getting updates for " .. program)
|
print("error! getting updates for " .. program)
|
||||||
error()
|
error()
|
||||||
|
|
Loading…
Reference in a new issue