Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
redis.set('aliases:' + id, JSON.stringify(alias), function(data) {
if (alias.max_usage){
redis.set('counter:' + id, alias.max_usage, function(data){
callback(alias.aid);
})
}else{
callback(alias.aid);
}
});
});
getNextId(function(id) {
alias.aid = id;
redis.set('aliases:' + id, JSON.stringify(alias), function(data) {
if (alias.max_usage){
redis.set('counter:' + id, alias.max_usage, function(data){
callback(alias.aid);
})
}else{
callback(alias.aid);
}
});
});
}
redis.get(lock_key, function(exp){
if (parseInt(exp, 10) < (t)){
redis.set(lock_key, t+config.http.rate_limit, function(){
rbl_check();
});
}else{
err(403, {error: 'rate-limited', description: 'please wait a moment before generating the next alias'});
}
});
}else{
redis.setnx('reservations:' + id, 'reserved', function(data) {
if (parseInt(""+data, 10) == 0) {
redis.set('admin:keylength', len, function(data){
uuidg();
});
}
callback(id);
});
}();