mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-29 22:35:50 -04:00
refactor(config.js): Extract config file
* Separate different config source to each files * Freeze config object
This commit is contained in:
parent
4738ba7d36
commit
ecb0533605
15 changed files with 767 additions and 618 deletions
lib
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue