mirror of https://github.com/Chocobozzz/PeerTube
Server: fix real world tools
parent
1f0f84c27e
commit
3fad43acfb
|
@ -2,7 +2,8 @@
|
|||
|
||||
const program = require('commander')
|
||||
|
||||
const utils = require('../../api/utils')
|
||||
const utilsClient = require('../../utils/clients')
|
||||
const utilsLogin = require('../../utils/login')
|
||||
|
||||
program
|
||||
.option('-u, --url <url>', 'Server url')
|
||||
|
@ -30,13 +31,13 @@ const server = {
|
|||
}
|
||||
}
|
||||
|
||||
utils.getClient(program.url, function (err, res) {
|
||||
utilsClient.getClient(program.url, function (err, res) {
|
||||
if (err) throw err
|
||||
|
||||
server.client.id = res.body.client_id
|
||||
server.client.secret = res.body.client_secret
|
||||
|
||||
utils.loginAndGetAccessToken(server, function (err, accessToken) {
|
||||
utilsLogin.loginAndGetAccessToken(server, function (err, accessToken) {
|
||||
if (err) throw err
|
||||
|
||||
console.log(accessToken)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
const program = require('commander')
|
||||
const fs = require('fs')
|
||||
|
||||
const utils = require('../../api/utils')
|
||||
const utils = require('../../utils/videos')
|
||||
|
||||
program
|
||||
.option('-u, --url <url>', 'Server url')
|
||||
|
|
|
@ -9,7 +9,7 @@ const clientsUtils = {
|
|||
// ---------------------- Export functions --------------------
|
||||
|
||||
function getClient (url, end) {
|
||||
const path = '/api/v1/users/client'
|
||||
const path = '/api/v1/clients/local'
|
||||
|
||||
request(url)
|
||||
.get(path)
|
||||
|
|
Loading…
Reference in New Issue