diff options
author | Chocobozzz <me@florianbigard.com> | 2018-11-23 11:06:10 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-11-23 11:07:00 +0100 |
commit | 1b5e2d72900c8ceaf76940b72839d3c424ac96e8 (patch) | |
tree | 155fb65bd2d35259294dcfdb9d0c3e1de0400b92 /server/tools/peertube-repl.ts | |
parent | f95cb03a29716a455ad89877dfd5192d825e3931 (diff) | |
download | PeerTube-1b5e2d72900c8ceaf76940b72839d3c424ac96e8.tar.gz PeerTube-1b5e2d72900c8ceaf76940b72839d3c424ac96e8.tar.zst PeerTube-1b5e2d72900c8ceaf76940b72839d3c424ac96e8.zip |
Optimize config endpoint
Diffstat (limited to 'server/tools/peertube-repl.ts')
-rw-r--r-- | server/tools/peertube-repl.ts | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/server/tools/peertube-repl.ts b/server/tools/peertube-repl.ts index 6800ff8ab..04d8b95a3 100644 --- a/server/tools/peertube-repl.ts +++ b/server/tools/peertube-repl.ts | |||
@@ -20,14 +20,10 @@ import * as signupUtils from '../helpers/signup' | |||
20 | import * as utils from '../helpers/utils' | 20 | import * as utils from '../helpers/utils' |
21 | import * as YoutubeDLUtils from '../helpers/youtube-dl' | 21 | import * as YoutubeDLUtils from '../helpers/youtube-dl' |
22 | 22 | ||
23 | let versionCommitHash | ||
24 | |||
25 | const start = async () => { | 23 | const start = async () => { |
26 | await initDatabaseModels(true) | 24 | await initDatabaseModels(true) |
27 | 25 | ||
28 | await utils.getVersion().then((data) => { | 26 | const versionCommitHash = await utils.getServerCommit() |
29 | versionCommitHash = data | ||
30 | }) | ||
31 | 27 | ||
32 | const initContext = (replServer) => { | 28 | const initContext = (replServer) => { |
33 | return (context) => { | 29 | return (context) => { |
@@ -59,6 +55,7 @@ const start = async () => { | |||
59 | 55 | ||
60 | initContext(replServer)(replServer.context) | 56 | initContext(replServer)(replServer.context) |
61 | replServer.on('reset', initContext(replServer)) | 57 | replServer.on('reset', initContext(replServer)) |
58 | replServer.on('exit', () => process.exit()) | ||
62 | 59 | ||
63 | const resetCommand = { | 60 | const resetCommand = { |
64 | help: 'Reset REPL', | 61 | help: 'Reset REPL', |