Fix channel registration rank from /account/channels

This commit is contained in:
calzoneman 2013-12-26 23:53:43 -05:00
parent ead38a9d35
commit e27667b6d2
1 changed files with 12 additions and 6 deletions

View File

@ -47,24 +47,30 @@ function initTables(name, owner, callback) {
return;
}
// TODO add owner to ranks table
createLibraryTable(name, function (err) {
module.exports.setRank(name, owner, 4, function (err) {
if (err) {
dropTable("chan_" + name + "_ranks");
callback(err, null);
return;
}
createBansTable(name, function (err) {
createLibraryTable(name, function (err) {
if (err) {
dropTable("chan_" + name + "_ranks");
dropTable("chan_" + name + "_library");
callback(err, null);
return;
}
callback(null, true);
createBansTable(name, function (err) {
if (err) {
dropTable("chan_" + name + "_ranks");
dropTable("chan_" + name + "_library");
callback(err, null);
return;
}
callback(null, true);
});
});
});
});