1
0
Fork 0
peertube/server/controllers/api/config.ts
2017-06-17 11:28:11 +02:00

24 lines
571 B
TypeScript

import * as express from 'express'
import { CONFIG } from '../../initializers'
import { ServerConfig } from '../../../shared'
const configRouter = express.Router()
configRouter.get('/', getConfig)
// Get the client credentials for the PeerTube front end
function getConfig (req: express.Request, res: express.Response, next: express.NextFunction) {
const json: ServerConfig = {
signup: {
enabled: CONFIG.SIGNUP.ENABLED
}
}
res.json(json)
}
// ---------------------------------------------------------------------------
export {
configRouter
}