Server: fix real world tools
authorChocobozzz <florian.bigard@gmail.com>
Mon, 10 Oct 2016 19:33:40 +0000 (21:33 +0200)
committerChocobozzz <florian.bigard@gmail.com>
Mon, 10 Oct 2016 19:33:40 +0000 (21:33 +0200)
server/tests/real-world/tools/get-access-token.js
server/tests/real-world/tools/upload.js
server/tests/utils/clients.js

index 4f98e9c9f837e21a551d62bb1cc63c93527fd420..483cefa952c3319699dd0b07342f69e473843304 100644 (file)
@@ -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)
index 39b4c9b40cf2fc4efb305207c7b6abac991f9459..ba08028cf6fd1f2c161a223e7a4b6e691b0a0e21 100644 (file)
@@ -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')
index e3ded493e69cf050f2d4d8b9cf3abe140d24a352..b3ae18d01f346e1de1576e1e534b4cd4004eac32 100644 (file)
@@ -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)