mirror of https://github.com/calzoneman/sync.git
Fixes
This commit is contained in:
parent
7f62e14045
commit
7d35df4f5a
|
@ -140,7 +140,7 @@ function migrate(src, dest) {
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.error(`Failed to migrate /r/${name}: ${err.stack}`);
|
console.error(`Failed to migrate /r/${name}: ${err.stack}`);
|
||||||
});
|
});
|
||||||
});
|
}, 0);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,6 @@ var bcrypt = require("bcrypt");
|
||||||
var $util = require("./utilities");
|
var $util = require("./utilities");
|
||||||
var Logger = require("./logger");
|
var Logger = require("./logger");
|
||||||
var Config = require("./config");
|
var Config = require("./config");
|
||||||
var Server = require("./server");
|
|
||||||
var tables = require("./database/tables");
|
var tables = require("./database/tables");
|
||||||
var net = require("net");
|
var net = require("net");
|
||||||
var util = require("./utilities");
|
var util = require("./utilities");
|
||||||
|
@ -556,11 +555,6 @@ module.exports.listStats = function (callback) {
|
||||||
|
|
||||||
/* Misc */
|
/* Misc */
|
||||||
module.exports.loadAnnouncement = function () {
|
module.exports.loadAnnouncement = function () {
|
||||||
// Temporary workaround
|
|
||||||
if (!Server.getServer || !Server.getServer()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var query = "SELECT * FROM `meta` WHERE `key`='announcement'";
|
var query = "SELECT * FROM `meta` WHERE `key`='announcement'";
|
||||||
module.exports.query(query, function (err, rows) {
|
module.exports.query(query, function (err, rows) {
|
||||||
if (err) {
|
if (err) {
|
||||||
|
@ -581,6 +575,11 @@ module.exports.loadAnnouncement = function () {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var Server = require("./server");
|
||||||
|
if (!Server.getServer || !Server.getServer()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var sv = Server.getServer();
|
var sv = Server.getServer();
|
||||||
sv.announcement = announcement;
|
sv.announcement = announcement;
|
||||||
for (var id in sv.ioServers) {
|
for (var id in sv.ioServers) {
|
||||||
|
|
Loading…
Reference in New Issue