aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api')
-rw-r--r--server/controllers/api/clients.ts2
-rw-r--r--server/controllers/api/config.ts2
-rw-r--r--server/controllers/api/pods.ts6
-rw-r--r--server/controllers/api/remote/pods.ts4
-rw-r--r--server/controllers/api/remote/videos.ts2
-rw-r--r--server/controllers/api/users.ts4
-rw-r--r--server/controllers/api/videos/abuse.ts2
-rw-r--r--server/controllers/api/videos/blacklist.ts2
-rw-r--r--server/controllers/api/videos/index.ts2
-rw-r--r--server/controllers/api/videos/rate.ts2
10 files changed, 14 insertions, 14 deletions
diff --git a/server/controllers/api/clients.ts b/server/controllers/api/clients.ts
index 902f62995..614163c83 100644
--- a/server/controllers/api/clients.ts
+++ b/server/controllers/api/clients.ts
@@ -2,7 +2,7 @@ import express = require('express')
2 2
3import { CONFIG } from '../../initializers'; 3import { CONFIG } from '../../initializers';
4import { logger } from '../../helpers' 4import { logger } from '../../helpers'
5const db = require('../../initializers/database') 5import { database as db } from '../../initializers/database'
6 6
7const clientsRouter = express.Router() 7const clientsRouter = express.Router()
8 8
diff --git a/server/controllers/api/config.ts b/server/controllers/api/config.ts
index 8f3fa2473..8bdde61b3 100644
--- a/server/controllers/api/config.ts
+++ b/server/controllers/api/config.ts
@@ -1,6 +1,6 @@
1import express = require('express') 1import express = require('express')
2 2
3import { CONFIG } from '../../initializers'; 3import { CONFIG } from '../../initializers'
4 4
5const configRouter = express.Router() 5const configRouter = express.Router()
6 6
diff --git a/server/controllers/api/pods.ts b/server/controllers/api/pods.ts
index 06dfd8295..4ff1f5d9f 100644
--- a/server/controllers/api/pods.ts
+++ b/server/controllers/api/pods.ts
@@ -1,7 +1,7 @@
1import express = require('express') 1import express = require('express')
2import { waterfall } from 'async' 2import { waterfall } from 'async'
3 3
4const db = require('../../initializers/database') 4import { database as db } from '../../initializers/database'
5import { CONFIG } from '../../initializers' 5import { CONFIG } from '../../initializers'
6import { 6import {
7 logger, 7 logger,
@@ -35,12 +35,12 @@ podsRouter.post('/makefriends',
35 ensureIsAdmin, 35 ensureIsAdmin,
36 makeFriendsValidator, 36 makeFriendsValidator,
37 setBodyHostsPort, 37 setBodyHostsPort,
38 makeFriends 38 makeFriendsController
39) 39)
40podsRouter.get('/quitfriends', 40podsRouter.get('/quitfriends',
41 authenticate, 41 authenticate,
42 ensureIsAdmin, 42 ensureIsAdmin,
43 quitFriends 43 quitFriendsController
44) 44)
45 45
46// --------------------------------------------------------------------------- 46// ---------------------------------------------------------------------------
diff --git a/server/controllers/api/remote/pods.ts b/server/controllers/api/remote/pods.ts
index 85ef7bb42..7a9a0c4f0 100644
--- a/server/controllers/api/remote/pods.ts
+++ b/server/controllers/api/remote/pods.ts
@@ -1,7 +1,7 @@
1import express = require('express') 1import express = require('express')
2import { waterfall } from 'async/waterfall' 2import * as waterfall from 'async/waterfall'
3 3
4const db = require('../../../initializers/database') 4import { database as db } from '../../../initializers/database'
5import { checkSignature, signatureValidator } from '../../../middlewares' 5import { checkSignature, signatureValidator } from '../../../middlewares'
6 6
7const remotePodsRouter = express.Router() 7const remotePodsRouter = express.Router()
diff --git a/server/controllers/api/remote/videos.ts b/server/controllers/api/remote/videos.ts
index df4ba8309..178a21e7c 100644
--- a/server/controllers/api/remote/videos.ts
+++ b/server/controllers/api/remote/videos.ts
@@ -1,7 +1,7 @@
1import express = require('express') 1import express = require('express')
2import { eachSeries, waterfall } from 'async' 2import { eachSeries, waterfall } from 'async'
3 3
4const db = require('../../../initializers/database') 4import { database as db } from '../../../initializers/database'
5import { 5import {
6 REQUEST_ENDPOINT_ACTIONS, 6 REQUEST_ENDPOINT_ACTIONS,
7 REQUEST_ENDPOINTS, 7 REQUEST_ENDPOINTS,
diff --git a/server/controllers/api/users.ts b/server/controllers/api/users.ts
index 981a4706a..97a744f54 100644
--- a/server/controllers/api/users.ts
+++ b/server/controllers/api/users.ts
@@ -1,7 +1,7 @@
1import express = require('express') 1import express = require('express')
2import { waterfall } from 'async' 2import { waterfall } from 'async'
3 3
4const db = require('../../initializers/database') 4import { database as db } from '../../initializers/database'
5import { CONFIG, USER_ROLES } from '../../initializers' 5import { CONFIG, USER_ROLES } from '../../initializers'
6import { logger, getFormatedObjects } from '../../helpers' 6import { logger, getFormatedObjects } from '../../helpers'
7import { 7import {
@@ -114,7 +114,7 @@ function getUserVideoRating (req, res, next) {
114 const videoId = req.params.videoId 114 const videoId = req.params.videoId
115 const userId = res.locals.oauth.token.User.id 115 const userId = res.locals.oauth.token.User.id
116 116
117 db.UserVideoRate.load(userId, videoId, function (err, ratingObj) { 117 db.UserVideoRate.load(userId, videoId, null, function (err, ratingObj) {
118 if (err) return next(err) 118 if (err) return next(err)
119 119
120 const rating = ratingObj ? ratingObj.type : 'none' 120 const rating = ratingObj ? ratingObj.type : 'none'
diff --git a/server/controllers/api/videos/abuse.ts b/server/controllers/api/videos/abuse.ts
index 88204120f..3dd884354 100644
--- a/server/controllers/api/videos/abuse.ts
+++ b/server/controllers/api/videos/abuse.ts
@@ -1,7 +1,7 @@
1import express = require('express') 1import express = require('express')
2import { waterfall } from 'async' 2import { waterfall } from 'async'
3 3
4const db = require('../../../initializers/database') 4import { database as db } from '../../../initializers/database'
5import friends = require('../../../lib/friends') 5import friends = require('../../../lib/friends')
6import { 6import {
7 logger, 7 logger,
diff --git a/server/controllers/api/videos/blacklist.ts b/server/controllers/api/videos/blacklist.ts
index db6d95e73..fb4d57d7b 100644
--- a/server/controllers/api/videos/blacklist.ts
+++ b/server/controllers/api/videos/blacklist.ts
@@ -1,6 +1,6 @@
1import express = require('express') 1import express = require('express')
2 2
3const db = require('../../../initializers/database') 3import { database as db } from '../../../initializers/database'
4import { logger } from '../../../helpers' 4import { logger } from '../../../helpers'
5import { 5import {
6 authenticate, 6 authenticate,
diff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.ts
index 5fbf03676..6eda7159b 100644
--- a/server/controllers/api/videos/index.ts
+++ b/server/controllers/api/videos/index.ts
@@ -4,7 +4,7 @@ import multer = require('multer')
4import path = require('path') 4import path = require('path')
5import { waterfall } from 'async' 5import { waterfall } from 'async'
6 6
7const db = require('../../../initializers/database') 7import { database as db } from '../../../initializers/database'
8import { 8import {
9 CONFIG, 9 CONFIG,
10 REQUEST_VIDEO_QADU_TYPES, 10 REQUEST_VIDEO_QADU_TYPES,
diff --git a/server/controllers/api/videos/rate.ts b/server/controllers/api/videos/rate.ts
index 21053792a..571ff68e3 100644
--- a/server/controllers/api/videos/rate.ts
+++ b/server/controllers/api/videos/rate.ts
@@ -1,7 +1,7 @@
1import express = require('express') 1import express = require('express')
2import { waterfall } from 'async' 2import { waterfall } from 'async'
3 3
4const db = require('../../../initializers/database') 4import { database as db } from '../../../initializers/database'
5import { 5import {
6 logger, 6 logger,
7 retryTransactionWrapper, 7 retryTransactionWrapper,