System Settings UI + code cleanup
This commit is contained in:
		| @@ -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) | ||||
|         }) | ||||
|       }) | ||||
|     }) | ||||
|   }, | ||||
|   | ||||
| @@ -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 | ||||
|   } | ||||
|  | ||||
| } | ||||
		Reference in New Issue
	
	Block a user