Installed API infrastructure, getText works already

This commit is contained in:
Peter 'Pita' Martischka 2011-08-03 19:31:25 +01:00
parent 39b5f57d4e
commit f45b7ce9ea
7 changed files with 672 additions and 5 deletions

View file

@ -19,6 +19,7 @@
*/
require("../db/Pad");
var db = require("./DB").db;
/**
* A Array with all known Pads
@ -58,6 +59,13 @@ exports.getPad = function(id, callback)
}
});
}
//globalPads[id].timestamp = new Date().getTime();
}
//checks if a pad exists
exports.doesPadExists = function(padId, callback)
{
db.get("pad:"+padId, function(err, value)
{
callback(err, value != null);
});
}