summaryrefslogtreecommitdiff
path: root/src/node/hooks/express/padreadonly.js
diff options
context:
space:
mode:
authorLuc Didry <luc@didry.org>2013-12-05 08:41:29 +0100
committerLuc Didry <luc@didry.org>2013-12-05 08:41:29 +0100
commit3d8452b1439fd24473fb68653cb2f7e3e0bbdb4b (patch)
tree87b7ba7cd1a2ddc61924c479c1b5e42abf4db502 /src/node/hooks/express/padreadonly.js
parent03ff5563f4ed406b6afaacc575e06e86aa939947 (diff)
downloadetherpad-lite-3d8452b1439fd24473fb68653cb2f7e3e0bbdb4b.zip
Replace tabs indentation with spaces indentation
Some files are obviously external libraries, I didn't touch them
Diffstat (limited to 'src/node/hooks/express/padreadonly.js')
-rw-r--r--src/node/hooks/express/padreadonly.js56
1 files changed, 28 insertions, 28 deletions
diff --git a/src/node/hooks/express/padreadonly.js b/src/node/hooks/express/padreadonly.js
index af5cbed3..9a0a52bf 100644
--- a/src/node/hooks/express/padreadonly.js
+++ b/src/node/hooks/express/padreadonly.js
@@ -16,50 +16,50 @@ exports.expressCreateServer = function (hook_name, args, cb) {
//translate the read only pad to a padId
function(callback)
{
- readOnlyManager.getPadId(req.params.id, function(err, _padId)
- {
- if(ERR(err, callback)) return;
+ readOnlyManager.getPadId(req.params.id, function(err, _padId)
+ {
+ if(ERR(err, callback)) return;
- padId = _padId;
+ padId = _padId;
- //we need that to tell hasPadAcess about the pad
- req.params.pad = padId;
+ //we need that to tell hasPadAcess about the pad
+ req.params.pad = padId;
- callback();
- });
+ callback();
+ });
},
//render the html document
function(callback)
{
- //return if the there is no padId
- if(padId == null)
- {
- callback("notfound");
- return;
- }
+ //return if the there is no padId
+ if(padId == null)
+ {
+ callback("notfound");
+ return;
+ }
- hasPadAccess(req, res, function()
- {
- //render the html document
- exporthtml.getPadHTMLDocument(padId, null, false, function(err, _html)
- {
- if(ERR(err, callback)) return;
- html = _html;
- callback();
- });
- });
+ hasPadAccess(req, res, function()
+ {
+ //render the html document
+ exporthtml.getPadHTMLDocument(padId, null, false, function(err, _html)
+ {
+ if(ERR(err, callback)) return;
+ html = _html;
+ callback();
+ });
+ });
}
], function(err)
{
//throw any unexpected error
if(err && err != "notfound")
- ERR(err);
+ ERR(err);
if(err == "notfound")
- res.send(404, '404 - Not Found');
+ res.send(404, '404 - Not Found');
else
- res.send(html);
+ res.send(html);
});
});
-} \ No newline at end of file
+}