refactor(config.js): Extract config file
* Separate different config source to each files * Freeze config object
This commit is contained in:
@@ -28,7 +28,8 @@ var realtime = {
|
||||
secure: secure,
|
||||
connection: connection,
|
||||
getStatus: getStatus,
|
||||
isReady: isReady
|
||||
isReady: isReady,
|
||||
maintenance: true
|
||||
}
|
||||
|
||||
function onAuthorizeSuccess (data, accept) {
|
||||
@@ -699,7 +700,7 @@ function updateHistory (userId, note, time) {
|
||||
}
|
||||
|
||||
function connection (socket) {
|
||||
if (config.maintenance) return
|
||||
if (realtime.maintenance) return
|
||||
parseNoteIdFromSocket(socket, function (err, noteId) {
|
||||
if (err) {
|
||||
return failConnection(500, err, socket)
|
||||
|
||||
Reference in New Issue
Block a user