diff options
author | Chocobozzz <me@florianbigard.com> | 2018-12-05 15:10:45 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-12-05 15:10:45 +0100 |
commit | 3b3b18203fe73e499bf8b49b15369710df95993e (patch) | |
tree | 7f682442453bf126fb0acc20ada2593dcc2ae3ae /server/controllers/api/config.ts | |
parent | 56af5222c1ab3d6aaa76b1237bfa381ecc4878b1 (diff) | |
download | PeerTube-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/config.ts')
-rw-r--r-- | server/controllers/api/config.ts | 4 |
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' | |||
11 | import { auditLoggerFactory, CustomConfigAuditView, getAuditIdFromRes } from '../../helpers/audit-logger' | 11 | import { auditLoggerFactory, CustomConfigAuditView, getAuditIdFromRes } from '../../helpers/audit-logger' |
12 | import { remove, writeJSON } from 'fs-extra' | 12 | import { remove, writeJSON } from 'fs-extra' |
13 | import { getServerCommit } from '../../helpers/utils' | 13 | import { getServerCommit } from '../../helpers/utils' |
14 | import { Emailer } from '../../lib/emailer' | ||
14 | 15 | ||
15 | const packageJSON = require('../../../../package.json') | 16 | const packageJSON = require('../../../../package.json') |
16 | const configRouter = express.Router() | 17 | const 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: { |