mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-14 15:14:56 -04:00
switching to eslint for code checking
most rules degraded to WARN, so we don't go insane. This will change over time. The aim is to conform to a common style Signed-off-by: Claudius Coenen <opensource@amenthes.de>
This commit is contained in:
parent
f9aa001ee7
commit
858a59529e
13 changed files with 75 additions and 44 deletions
|
@ -242,6 +242,7 @@ function getStatus (callback) {
|
|||
}
|
||||
})
|
||||
models.User.count().then(function (regcount) {
|
||||
// eslint-disable-next-line standard/no-callback-literal
|
||||
return callback ? callback({
|
||||
onlineNotes: Object.keys(notes).length,
|
||||
onlineUsers: Object.keys(users).length,
|
||||
|
@ -283,7 +284,7 @@ function extractNoteIdFromSocket (socket) {
|
|||
if (!referer) {
|
||||
return false
|
||||
}
|
||||
var hostUrl = url.parse(referer)
|
||||
var hostUrl = url.URL.parse(referer)
|
||||
var noteId = config.urlPath ? hostUrl.pathname.slice(config.urlPath.length + 1, hostUrl.pathname.length).split('/')[1] : hostUrl.pathname.split('/')[1]
|
||||
return noteId
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue