aboutsummaryrefslogblamecommitdiffhomepage
path: root/server/controllers/api/config.ts
blob: c639817976a7ca6cb1cb1db88a1da9e3e4420a0b (plain) (tree)
1
2
3
4
5
6
7
8
9
                                  
 
                                           





                                                        
                                                                                              











                                                                              
import * as express from 'express'

import { CONFIG } from '../../initializers'

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) {
  res.json({
    signup: {
      enabled: CONFIG.SIGNUP.ENABLED
    }
  })
}

// ---------------------------------------------------------------------------

export {
  configRouter
}