X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fcontrollers%2Fapi%2Fclients.ts;h=8c460096bef12ec15c7c9a1d0e8ed5dd49be3825;hb=69818c9394366b954b6ba3bd697bd9d2b09f2a16;hp=902f62995d5bbcf688563c73ce09c36b782ff521;hpb=65fcc3119c334b75dd13bcfdebf186afdc580a8f;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/controllers/api/clients.ts b/server/controllers/api/clients.ts index 902f62995..8c460096b 100644 --- a/server/controllers/api/clients.ts +++ b/server/controllers/api/clients.ts @@ -1,15 +1,15 @@ -import express = require('express') +import * as express from 'express' -import { CONFIG } from '../../initializers'; +import { CONFIG } from '../../initializers' import { logger } from '../../helpers' -const db = require('../../initializers/database') +import { database as db } from '../../initializers/database' const clientsRouter = express.Router() clientsRouter.get('/local', getLocalClient) // Get the client credentials for the PeerTube front end -function getLocalClient (req, res, next) { +function getLocalClient (req: express.Request, res: express.Response, next: express.NextFunction) { const serverHostname = CONFIG.WEBSERVER.HOSTNAME const serverPort = CONFIG.WEBSERVER.PORT let headerHostShouldBe = serverHostname