Skip to content

Commit

Permalink
mheh
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnMcLear committed Jan 22, 2013
1 parent 205d983 commit d21585b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/node/db/API.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ var async = require("async");
var exportHtml = require("../utils/ExportHtml");
var importHtml = require("../utils/ImportHtml");
var cleanText = require("./Pad").cleanText;
var padDiff = require("../utils/padDiff");
var PadDiff = require("../utils/padDiff");

/**********************/
/**GROUP FUNCTIONS*****/
Expand Down Expand Up @@ -611,16 +611,19 @@ exports.createDiff = function(padID, startRev, endRev, callback){
//get the pad
getPadSafe(padID, true, function(err, pad)
{
console.warn(padID);
if(err){
return callback(err);
}

try {
console.warn(pad);
var padDiff = new PadDiff(pad, startRev, endRev);
console.warn("AFTER");
} catch(e) {
return callback({stop:e.message});
}

/*
var html, authors;
async.series([
Expand All @@ -647,6 +650,7 @@ exports.createDiff = function(padID, startRev, endRev, callback){
], function(err){
callback(err, {html: html, authors: authors})
});
*/
});
}

Expand Down
1 change: 1 addition & 0 deletions src/node/utils/padDiff.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
exports.createDiff = function(padID, startRev, endRev, callback){
console.warn("WTF");

//check if rev is a number
if(startRev !== undefined && typeof startRev != "number")
{
Expand Down

0 comments on commit d21585b

Please sign in to comment.