i
This commit is contained in:
parent
883655717f
commit
8ad4fb3a80
1 changed files with 5 additions and 13 deletions
18
index.js
18
index.js
|
@ -20,17 +20,6 @@ if (log_disabled) {
|
|||
|
||||
app.use("/files", express.static("projects"));
|
||||
|
||||
app.use(function myMiddleware(req, res, next) {
|
||||
req.rawBody = '';
|
||||
|
||||
req.on('data', function (chunk) {
|
||||
req.rawBody += chunk;
|
||||
});
|
||||
|
||||
// call next() outside of 'end' after setting 'data' handler
|
||||
next();
|
||||
});
|
||||
|
||||
function get_indexes(project_id) {
|
||||
if (cache[project_id]) {
|
||||
let indexes = "";
|
||||
|
@ -69,8 +58,11 @@ app.get("/indexes/:project(\\w+)", (req, res) => {
|
|||
res.sendStatus(404);
|
||||
}
|
||||
});
|
||||
|
||||
app.use(express.raw());
|
||||
app.use((req, res, next) => {
|
||||
console.log(req);
|
||||
next();
|
||||
})
|
||||
app.use(express.urlencoded({ extended: false }));
|
||||
|
||||
function diff(current, checked) {
|
||||
let lines_current = current.split('\n').map(l => l.trim()).filter(l => l != "");
|
||||
|
|
Loading…
Reference in a new issue