mirror of https://github.com/calzoneman/sync.git
Fix channel registration rank from /account/channels
This commit is contained in:
parent
ead38a9d35
commit
e27667b6d2
|
@ -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);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue