diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2016-10-21 12:16:28 +0200 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2016-10-21 12:16:28 +0200 |
commit | f253b1c1f19d9cb056ab95b2cb6208952e073894 (patch) | |
tree | ce75f6a96d9ceebd09d33cedfa008c4efb32477b /server/controllers | |
parent | 844e39c2f843c6e2db81699176f13972c29c42fa (diff) | |
download | PeerTube-f253b1c1f19d9cb056ab95b2cb6208952e073894.tar.gz PeerTube-f253b1c1f19d9cb056ab95b2cb6208952e073894.tar.zst PeerTube-f253b1c1f19d9cb056ab95b2cb6208952e073894.zip |
Server: remove v1 directory, we don't really need it
Diffstat (limited to 'server/controllers')
-rw-r--r-- | server/controllers/api/clients.js (renamed from server/controllers/api/v1/clients.js) | 2 | ||||
-rw-r--r-- | server/controllers/api/index.js (renamed from server/controllers/api/v1/index.js) | 0 | ||||
-rw-r--r-- | server/controllers/api/pods.js (renamed from server/controllers/api/v1/pods.js) | 6 | ||||
-rw-r--r-- | server/controllers/api/remote.js (renamed from server/controllers/api/v1/remote.js) | 4 | ||||
-rw-r--r-- | server/controllers/api/requests.js (renamed from server/controllers/api/v1/requests.js) | 4 | ||||
-rw-r--r-- | server/controllers/api/users.js (renamed from server/controllers/api/v1/users.js) | 8 | ||||
-rw-r--r-- | server/controllers/api/videos.js (renamed from server/controllers/api/v1/videos.js) | 10 | ||||
-rw-r--r-- | server/controllers/index.js | 4 |
8 files changed, 18 insertions, 20 deletions
diff --git a/server/controllers/api/v1/clients.js b/server/controllers/api/clients.js index 5b460db2e..ce1149227 100644 --- a/server/controllers/api/v1/clients.js +++ b/server/controllers/api/clients.js | |||
@@ -3,7 +3,7 @@ | |||
3 | const express = require('express') | 3 | const express = require('express') |
4 | const mongoose = require('mongoose') | 4 | const mongoose = require('mongoose') |
5 | 5 | ||
6 | const constants = require('../../../initializers/constants') | 6 | const constants = require('../../initializers/constants') |
7 | 7 | ||
8 | const Client = mongoose.model('OAuthClient') | 8 | const Client = mongoose.model('OAuthClient') |
9 | 9 | ||
diff --git a/server/controllers/api/v1/index.js b/server/controllers/api/index.js index 4cb65ed55..4cb65ed55 100644 --- a/server/controllers/api/v1/index.js +++ b/server/controllers/api/index.js | |||
diff --git a/server/controllers/api/v1/pods.js b/server/controllers/api/pods.js index 2f4621327..853e0705b 100644 --- a/server/controllers/api/v1/pods.js +++ b/server/controllers/api/pods.js | |||
@@ -4,9 +4,9 @@ const express = require('express') | |||
4 | const mongoose = require('mongoose') | 4 | const mongoose = require('mongoose') |
5 | const waterfall = require('async/waterfall') | 5 | const waterfall = require('async/waterfall') |
6 | 6 | ||
7 | const logger = require('../../../helpers/logger') | 7 | const logger = require('../../helpers/logger') |
8 | const friends = require('../../../lib/friends') | 8 | const friends = require('../../lib/friends') |
9 | const middlewares = require('../../../middlewares') | 9 | const middlewares = require('../../middlewares') |
10 | const admin = middlewares.admin | 10 | const admin = middlewares.admin |
11 | const oAuth = middlewares.oauth | 11 | const oAuth = middlewares.oauth |
12 | const podsMiddleware = middlewares.pods | 12 | const podsMiddleware = middlewares.pods |
diff --git a/server/controllers/api/v1/remote.js b/server/controllers/api/remote.js index a22c5d151..17b1d07c4 100644 --- a/server/controllers/api/v1/remote.js +++ b/server/controllers/api/remote.js | |||
@@ -5,10 +5,10 @@ const eachSeries = require('async/eachSeries') | |||
5 | const express = require('express') | 5 | const express = require('express') |
6 | const mongoose = require('mongoose') | 6 | const mongoose = require('mongoose') |
7 | 7 | ||
8 | const middlewares = require('../../../middlewares') | 8 | const middlewares = require('../../middlewares') |
9 | const secureMiddleware = middlewares.secure | 9 | const secureMiddleware = middlewares.secure |
10 | const validators = middlewares.validators.remote | 10 | const validators = middlewares.validators.remote |
11 | const logger = require('../../../helpers/logger') | 11 | const logger = require('../../helpers/logger') |
12 | 12 | ||
13 | const router = express.Router() | 13 | const router = express.Router() |
14 | const Video = mongoose.model('Video') | 14 | const Video = mongoose.model('Video') |
diff --git a/server/controllers/api/v1/requests.js b/server/controllers/api/requests.js index 97616424d..52aad6997 100644 --- a/server/controllers/api/v1/requests.js +++ b/server/controllers/api/requests.js | |||
@@ -3,8 +3,8 @@ | |||
3 | const express = require('express') | 3 | const express = require('express') |
4 | const mongoose = require('mongoose') | 4 | const mongoose = require('mongoose') |
5 | 5 | ||
6 | const constants = require('../../../initializers/constants') | 6 | const constants = require('../../initializers/constants') |
7 | const middlewares = require('../../../middlewares') | 7 | const middlewares = require('../../middlewares') |
8 | const admin = middlewares.admin | 8 | const admin = middlewares.admin |
9 | const oAuth = middlewares.oauth | 9 | const oAuth = middlewares.oauth |
10 | 10 | ||
diff --git a/server/controllers/api/v1/users.js b/server/controllers/api/users.js index 975e25e68..b4d687312 100644 --- a/server/controllers/api/v1/users.js +++ b/server/controllers/api/users.js | |||
@@ -5,10 +5,10 @@ const express = require('express') | |||
5 | const mongoose = require('mongoose') | 5 | const mongoose = require('mongoose') |
6 | const waterfall = require('async/waterfall') | 6 | const waterfall = require('async/waterfall') |
7 | 7 | ||
8 | const constants = require('../../../initializers/constants') | 8 | const constants = require('../../initializers/constants') |
9 | const friends = require('../../../lib/friends') | 9 | const friends = require('../../lib/friends') |
10 | const logger = require('../../../helpers/logger') | 10 | const logger = require('../../helpers/logger') |
11 | const middlewares = require('../../../middlewares') | 11 | const middlewares = require('../../middlewares') |
12 | const admin = middlewares.admin | 12 | const admin = middlewares.admin |
13 | const oAuth = middlewares.oauth | 13 | const oAuth = middlewares.oauth |
14 | const pagination = middlewares.pagination | 14 | const pagination = middlewares.pagination |
diff --git a/server/controllers/api/v1/videos.js b/server/controllers/api/videos.js index ee47ce7ac..e2d393074 100644 --- a/server/controllers/api/v1/videos.js +++ b/server/controllers/api/videos.js | |||
@@ -5,10 +5,10 @@ const mongoose = require('mongoose') | |||
5 | const multer = require('multer') | 5 | const multer = require('multer') |
6 | const waterfall = require('async/waterfall') | 6 | const waterfall = require('async/waterfall') |
7 | 7 | ||
8 | const constants = require('../../../initializers/constants') | 8 | const constants = require('../../initializers/constants') |
9 | const logger = require('../../../helpers/logger') | 9 | const logger = require('../../helpers/logger') |
10 | const friends = require('../../../lib/friends') | 10 | const friends = require('../../lib/friends') |
11 | const middlewares = require('../../../middlewares') | 11 | const middlewares = require('../../middlewares') |
12 | const oAuth = middlewares.oauth | 12 | const oAuth = middlewares.oauth |
13 | const pagination = middlewares.pagination | 13 | const pagination = middlewares.pagination |
14 | const validators = middlewares.validators | 14 | const validators = middlewares.validators |
@@ -17,7 +17,7 @@ const validatorsSort = validators.sort | |||
17 | const validatorsVideos = validators.videos | 17 | const validatorsVideos = validators.videos |
18 | const search = middlewares.search | 18 | const search = middlewares.search |
19 | const sort = middlewares.sort | 19 | const sort = middlewares.sort |
20 | const utils = require('../../../helpers/utils') | 20 | const utils = require('../../helpers/utils') |
21 | 21 | ||
22 | const router = express.Router() | 22 | const router = express.Router() |
23 | const Video = mongoose.model('Video') | 23 | const Video = mongoose.model('Video') |
diff --git a/server/controllers/index.js b/server/controllers/index.js index 4c1d3dafe..6a3f3f98f 100644 --- a/server/controllers/index.js +++ b/server/controllers/index.js | |||
@@ -1,8 +1,6 @@ | |||
1 | 'use strict' | 1 | 'use strict' |
2 | 2 | ||
3 | const constants = require('../initializers/constants') | 3 | const apiController = require('./api/') |
4 | |||
5 | const apiController = require('./api/' + constants.API_VERSION) | ||
6 | 4 | ||
7 | module.exports = { | 5 | module.exports = { |
8 | api: apiController | 6 | api: apiController |