mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-18 17:25:16 -04:00
Use import syntax for logger and config
Signed-off-by: David Mehren <dmehren1@gmail.com>
This commit is contained in:
parent
dd11483f44
commit
9f284b752b
14 changed files with 98 additions and 113 deletions
|
@ -2,8 +2,8 @@ import { Author, Note, Revision, User } from './models'
|
|||
|
||||
import ot from './ot'
|
||||
import history from './history'
|
||||
import logger from './logger'
|
||||
import config from './config'
|
||||
import { logger } from './logger'
|
||||
import { config } from './config'
|
||||
import moment from 'moment'
|
||||
import randomcolor from 'randomcolor'
|
||||
import async from 'async'
|
||||
|
@ -26,10 +26,8 @@ const realtime: any = {
|
|||
}
|
||||
/* eslint-enable @typescript-eslint/no-use-before-define */
|
||||
|
||||
|
||||
const disconnectSocketQueue: any = []
|
||||
|
||||
|
||||
function onAuthorizeSuccess (data, accept) {
|
||||
accept()
|
||||
}
|
||||
|
@ -384,7 +382,6 @@ function failConnection (code, err, socket) {
|
|||
return socket.disconnect(true)
|
||||
}
|
||||
|
||||
|
||||
function interruptConnection (socket, noteId, socketId) {
|
||||
if (notes[noteId]) delete notes[noteId]
|
||||
if (users[socketId]) delete users[socketId]
|
||||
|
@ -537,7 +534,6 @@ function operationCallback (socket, operation) {
|
|||
})
|
||||
}
|
||||
|
||||
|
||||
function startConnection (socket) {
|
||||
if (isConnectionBusy) return
|
||||
isConnectionBusy = true
|
||||
|
@ -715,7 +711,6 @@ setInterval(function () {
|
|||
})
|
||||
}, 60000)
|
||||
|
||||
|
||||
function updateUserData (socket, user) {
|
||||
// retrieve user data from passport
|
||||
if (socket.request.user && socket.request.user.logged_in) {
|
||||
|
@ -731,7 +726,6 @@ function updateUserData (socket, user) {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
function connection (socket) {
|
||||
if (realtime.maintenance) return
|
||||
parseNoteIdFromSocket(socket, function (err, noteId) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue