serve 404 when not possible key
This commit is contained in:
parent
9ed330bdae
commit
32b4f842b7
3 changed files with 38 additions and 21 deletions
|
@ -78,6 +78,11 @@ DocumentHandler.prototype.chooseKey = function(callback) {
|
|||
});
|
||||
};
|
||||
|
||||
// Return a boolean indicating whether or not something can be a key
|
||||
DocumentHandler.potentialKey = function(key) {
|
||||
return key.match(/^[a-zA-Z0-9]+$/);
|
||||
};
|
||||
|
||||
// Generate a random key
|
||||
DocumentHandler.prototype.randomKey = function() {
|
||||
var text = '';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue