]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame_incremental - server/controllers/api/config.ts
Move ensureRegistrationEnabled to middlewares
[github/Chocobozzz/PeerTube.git] / server / controllers / api / config.ts
... / ...
CommitLineData
1import * as express from 'express'
2
3import { CONFIG } from '../../initializers'
4import { ServerConfig } from '../../../shared'
5
6const configRouter = express.Router()
7
8configRouter.get('/', getConfig)
9
10// Get the client credentials for the PeerTube front end
11function getConfig (req: express.Request, res: express.Response, next: express.NextFunction) {
12 const json: ServerConfig = {
13 signup: {
14 enabled: CONFIG.SIGNUP.ENABLED
15 }
16 }
17 res.json(json)
18}
19
20// ---------------------------------------------------------------------------
21
22export {
23 configRouter
24}