1
0
Fork 0
peertube/server/controllers/api/v1/users.js
2016-03-21 11:56:33 +01:00

22 lines
629 B
JavaScript

'use strict'
var express = require('express')
var oAuth2 = require('../../../middlewares/oauth2')
const middleware = require('../../../middlewares')
const cacheMiddleware = middleware.cache
const router = express.Router()
router.post('/token', cacheMiddleware.cache(false), oAuth2.token(), success)
router.get('/authenticate', cacheMiddleware.cache(false), oAuth2.authenticate(), success)
// ---------------------------------------------------------------------------
module.exports = router
// ---------------------------------------------------------------------------
function success (req, res, next) {
res.end()
}