mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-05 06:37:10 -04:00
26 lines
724 B
JavaScript
26 lines
724 B
JavaScript
![]() |
var formidable = require('formidable');
|
||
|
|
||
|
module.exports = function(app)
|
||
|
{
|
||
|
//The Etherpad client side sends information about how a disconnect happen
|
||
|
app.post('/ep/pad/connection-diagnostic-info', function(req, res)
|
||
|
{
|
||
|
new formidable.IncomingForm().parse(req, function(err, fields, files)
|
||
|
{
|
||
|
console.log("DIAGNOSTIC-INFO: " + fields.diagnosticInfo);
|
||
|
res.end("OK");
|
||
|
});
|
||
|
});
|
||
|
|
||
|
//The Etherpad client side sends information about client side javscript errors
|
||
|
app.post('/jserror', function(req, res)
|
||
|
{
|
||
|
new formidable.IncomingForm().parse(req, function(err, fields, files)
|
||
|
{
|
||
|
console.error("CLIENT SIDE JAVASCRIPT ERROR: " + fields.errorInfo);
|
||
|
res.end("OK");
|
||
|
});
|
||
|
});
|
||
|
|
||
|
};
|