System Settings UI + code cleanup

This commit is contained in:
NGPixel
2017-02-12 23:17:14 -05:00
parent 007ad30cc6
commit 5223368e37
10 changed files with 53 additions and 43 deletions

View File

@@ -371,14 +371,13 @@ module.exports = {
// Delete old index entry
ws.emit('searchDel', {
auth: WSInternalKey,
entryPath
})
search.delete(entryPath)
// Create cache for new entry
return self.updateCache(newEntryPath)
return self.updateCache(newEntryPath).then(entry => {
return search.add(entry)
})
})
})
},

View File

@@ -1,26 +0,0 @@
'use strict'
const crypto = require('crypto')
/**
* Internal Authentication
*/
module.exports = {
_curKey: false,
init (inKey) {
this._curKey = inKey
return this
},
generateKey () {
return crypto.randomBytes(20).toString('hex')
},
validateKey (inKey) {
return inKey === this._curKey
}
}