aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers/config.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-02-17 10:27:00 +0100
committerChocobozzz <me@florianbigard.com>2020-02-17 10:27:00 +0100
commit4c1c17093461b58d3ee3f23f239e340d8dac1149 (patch)
tree236b724f1415a812a4274fd63b519124cba2e42f /server/initializers/config.ts
parent45f1bd72a08998c60a9dd68ff069cea9de39161c (diff)
downloadPeerTube-4c1c17093461b58d3ee3f23f239e340d8dac1149.tar.gz
PeerTube-4c1c17093461b58d3ee3f23f239e340d8dac1149.tar.zst
PeerTube-4c1c17093461b58d3ee3f23f239e340d8dac1149.zip
Refactor email enabled function
Diffstat (limited to 'server/initializers/config.ts')
-rw-r--r--server/initializers/config.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/server/initializers/config.ts b/server/initializers/config.ts
index 75372fa4e..950ca61bd 100644
--- a/server/initializers/config.ts
+++ b/server/initializers/config.ts
@@ -284,11 +284,16 @@ function registerConfigChangedHandler (fun: Function) {
284 configChangedHandlers.push(fun) 284 configChangedHandlers.push(fun)
285} 285}
286 286
287function isEmailEnabled () {
288 return !!CONFIG.SMTP.HOSTNAME && !!CONFIG.SMTP.PORT
289}
290
287// --------------------------------------------------------------------------- 291// ---------------------------------------------------------------------------
288 292
289export { 293export {
290 CONFIG, 294 CONFIG,
291 registerConfigChangedHandler 295 registerConfigChangedHandler,
296 isEmailEnabled
292} 297}
293 298
294// --------------------------------------------------------------------------- 299// ---------------------------------------------------------------------------