]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/controllers/api/config.ts
Move ensureRegistrationEnabled to middlewares
[github/Chocobozzz/PeerTube.git] / server / controllers / api / config.ts
index 57c9398ecaafbd57a326b9ee02887fa5ca160dc2..3e9aa77a5c6aac1bb7432adcac866d2abbe41b2d 100644 (file)
@@ -1,18 +1,20 @@
 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, res, next) {
-  res.json({
+function getConfig (req: express.Request, res: express.Response, next: express.NextFunction) {
+  const json: ServerConfig = {
     signup: {
       enabled: CONFIG.SIGNUP.ENABLED
     }
-  })
+  }
+  res.json(json)
 }
 
 // ---------------------------------------------------------------------------