aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-12-05 15:10:45 +0100
committerChocobozzz <me@florianbigard.com>2018-12-05 15:10:45 +0100
commit3b3b18203fe73e499bf8b49b15369710df95993e (patch)
tree7f682442453bf126fb0acc20ada2593dcc2ae3ae /server/controllers/api
parent56af5222c1ab3d6aaa76b1237bfa381ecc4878b1 (diff)
downloadPeerTube-3b3b18203fe73e499bf8b49b15369710df95993e.tar.gz
PeerTube-3b3b18203fe73e499bf8b49b15369710df95993e.tar.zst
PeerTube-3b3b18203fe73e499bf8b49b15369710df95993e.zip
Add error when email system is not configured and using the forgot
password system
Diffstat (limited to 'server/controllers/api')
-rw-r--r--server/controllers/api/config.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/server/controllers/api/config.ts b/server/controllers/api/config.ts
index 5233e9f68..d65e321e9 100644
--- a/server/controllers/api/config.ts
+++ b/server/controllers/api/config.ts
@@ -11,6 +11,7 @@ import { ClientHtml } from '../../lib/client-html'
11import { auditLoggerFactory, CustomConfigAuditView, getAuditIdFromRes } from '../../helpers/audit-logger' 11import { auditLoggerFactory, CustomConfigAuditView, getAuditIdFromRes } from '../../helpers/audit-logger'
12import { remove, writeJSON } from 'fs-extra' 12import { remove, writeJSON } from 'fs-extra'
13import { getServerCommit } from '../../helpers/utils' 13import { getServerCommit } from '../../helpers/utils'
14import { Emailer } from '../../lib/emailer'
14 15
15const packageJSON = require('../../../../package.json') 16const packageJSON = require('../../../../package.json')
16const configRouter = express.Router() 17const configRouter = express.Router()
@@ -61,6 +62,9 @@ async function getConfig (req: express.Request, res: express.Response) {
61 css: CONFIG.INSTANCE.CUSTOMIZATIONS.CSS 62 css: CONFIG.INSTANCE.CUSTOMIZATIONS.CSS
62 } 63 }
63 }, 64 },
65 email: {
66 enabled: Emailer.Instance.isEnabled()
67 },
64 serverVersion: packageJSON.version, 68 serverVersion: packageJSON.version,
65 serverCommit, 69 serverCommit,
66 signup: { 70 signup: {