]> 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 c639817976a7ca6cb1cb1db88a1da9e3e4420a0b..3e9aa77a5c6aac1bb7432adcac866d2abbe41b2d 100644 (file)
@@ -1,6 +1,7 @@
 import * as express from 'express'
 
 import { CONFIG } from '../../initializers'
+import { ServerConfig } from '../../../shared'
 
 const configRouter = express.Router()
 
@@ -8,11 +9,12 @@ 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({
+  const json: ServerConfig = {
     signup: {
       enabled: CONFIG.SIGNUP.ENABLED
     }
-  })
+  }
+  res.json(json)
 }
 
 // ---------------------------------------------------------------------------