mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-05 06:37:10 -04:00
finished a step I'd accidentally left half-completed in the refactoring of a higher-order function
This commit is contained in:
parent
c109af52e1
commit
b0a58b0b3e
1 changed files with 2 additions and 19 deletions
|
@ -232,7 +232,7 @@ function sendStatic(path, res, filename, callback){
|
||||||
var filePath = path.normalize(__dirname + "/../static/" + filename);
|
var filePath = path.normalize(__dirname + "/../static/" + filename);
|
||||||
return res.sendfile(filePath, { maxAge: exports.maxAge }, callback);
|
return res.sendfile(filePath, { maxAge: exports.maxAge }, callback);
|
||||||
}
|
}
|
||||||
function translateRoCombinator(managers, req, ERR, callback){
|
function translateRoCombinator(managers, req, ERR){
|
||||||
return function translateRo(callback){
|
return function translateRo(callback){
|
||||||
function padBack(err, padId){
|
function padBack(err, padId){
|
||||||
if(ERR(err, callback)) return;
|
if(ERR(err, callback)) return;
|
||||||
|
@ -347,24 +347,7 @@ async.waterfall([
|
||||||
var pad;
|
var pad;
|
||||||
|
|
||||||
async.waterfall([
|
async.waterfall([
|
||||||
//translate the read only pad to a padId
|
translateRoCombinater({ro: readOnlyManager}, req, ERR),
|
||||||
function(callback)
|
|
||||||
{
|
|
||||||
return translateRoCombinater({ro: readOnlyManager}, req, ERR, callback);
|
|
||||||
/*
|
|
||||||
readOnlyManager.getPadId(req.params.id, function(err, _padId)
|
|
||||||
{
|
|
||||||
if(ERR(err, callback)) return;
|
|
||||||
|
|
||||||
//padId = _padId;
|
|
||||||
|
|
||||||
//we need that to tell hasPadAcess about the pad
|
|
||||||
req.params.pad = _padId;
|
|
||||||
|
|
||||||
callback(null, _padId);
|
|
||||||
});
|
|
||||||
*/
|
|
||||||
},
|
|
||||||
//render the html document
|
//render the html document
|
||||||
function(padId, callback)
|
function(padId, callback)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue