mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 10:19:35 +02:00
ClientLocal -> OAuthClientLocal
This commit is contained in:
parent
d58cdea854
commit
0a381679e0
5 changed files with 12 additions and 12 deletions
|
@ -2,7 +2,7 @@ import * as express from 'express'
|
|||
|
||||
import { badRequest } from '../../helpers'
|
||||
|
||||
import { clientsRouter } from './clients'
|
||||
import { oauthClientsRouter } from './oauth-clients'
|
||||
import { configRouter } from './config'
|
||||
import { podsRouter } from './pods'
|
||||
import { remoteRouter } from './remote'
|
||||
|
@ -12,7 +12,7 @@ import { videosRouter } from './videos'
|
|||
|
||||
const apiRouter = express.Router()
|
||||
|
||||
apiRouter.use('/clients', clientsRouter)
|
||||
apiRouter.use('/oauth-clients', oauthClientsRouter)
|
||||
apiRouter.use('/config', configRouter)
|
||||
apiRouter.use('/pods', podsRouter)
|
||||
apiRouter.use('/remote', remoteRouter)
|
||||
|
|
|
@ -3,11 +3,11 @@ import * as express from 'express'
|
|||
import { CONFIG } from '../../initializers'
|
||||
import { logger } from '../../helpers'
|
||||
import { database as db } from '../../initializers/database'
|
||||
import { ClientLocal } from '../../../shared'
|
||||
import { OAuthClientLocal } from '../../../shared'
|
||||
|
||||
const clientsRouter = express.Router()
|
||||
const oauthClientsRouter = express.Router()
|
||||
|
||||
clientsRouter.get('/local', getLocalClient)
|
||||
oauthClientsRouter.get('/local', getLocalClient)
|
||||
|
||||
// Get the client credentials for the PeerTube front end
|
||||
function getLocalClient (req: express.Request, res: express.Response, next: express.NextFunction) {
|
||||
|
@ -28,7 +28,7 @@ function getLocalClient (req: express.Request, res: express.Response, next: expr
|
|||
if (err) return next(err)
|
||||
if (!client) return next(new Error('No client available.'))
|
||||
|
||||
const json: ClientLocal = {
|
||||
const json: OAuthClientLocal = {
|
||||
client_id: client.clientId,
|
||||
client_secret: client.clientSecret
|
||||
}
|
||||
|
@ -39,5 +39,5 @@ function getLocalClient (req: express.Request, res: express.Response, next: expr
|
|||
// ---------------------------------------------------------------------------
|
||||
|
||||
export {
|
||||
clientsRouter
|
||||
oauthClientsRouter
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue