aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api')
-rw-r--r--server/controllers/api/index.ts2
-rw-r--r--server/controllers/api/server/follows.ts (renamed from server/controllers/api/application/follows.ts)4
-rw-r--r--server/controllers/api/server/index.ts (renamed from server/controllers/api/application/index.ts)0
-rw-r--r--server/controllers/api/videos/abuse.ts6
-rw-r--r--server/controllers/api/videos/index.ts6
-rw-r--r--server/controllers/api/videos/rate.ts2
6 files changed, 10 insertions, 10 deletions
diff --git a/server/controllers/api/index.ts b/server/controllers/api/index.ts
index a22c78cce..876c911c7 100644
--- a/server/controllers/api/index.ts
+++ b/server/controllers/api/index.ts
@@ -4,7 +4,7 @@ import { badRequest } from '../../helpers'
4 4
5import { oauthClientsRouter } from './oauth-clients' 5import { oauthClientsRouter } from './oauth-clients'
6import { configRouter } from './config' 6import { configRouter } from './config'
7import { applicationRouter } from './application' 7import { applicationRouter } from './server'
8import { usersRouter } from './users' 8import { usersRouter } from './users'
9import { videosRouter } from './videos' 9import { videosRouter } from './videos'
10 10
diff --git a/server/controllers/api/application/follows.ts b/server/controllers/api/server/follows.ts
index 000bbd23e..c9775ad21 100644
--- a/server/controllers/api/application/follows.ts
+++ b/server/controllers/api/server/follows.ts
@@ -9,10 +9,10 @@ import { database as db } from '../../../initializers/database'
9import { sendFollow } from '../../../lib/activitypub/send-request' 9import { sendFollow } from '../../../lib/activitypub/send-request'
10import { asyncMiddleware, paginationValidator, setFollowersSort, setPagination } from '../../../middlewares' 10import { asyncMiddleware, paginationValidator, setFollowersSort, setPagination } from '../../../middlewares'
11import { authenticate } from '../../../middlewares/oauth' 11import { authenticate } from '../../../middlewares/oauth'
12import { setBodyHostsPort } from '../../../middlewares/pods' 12import { setBodyHostsPort } from '../../../middlewares/servers'
13import { setFollowingSort } from '../../../middlewares/sort' 13import { setFollowingSort } from '../../../middlewares/sort'
14import { ensureUserHasRight } from '../../../middlewares/user-right' 14import { ensureUserHasRight } from '../../../middlewares/user-right'
15import { followValidator } from '../../../middlewares/validators/pods' 15import { followValidator } from '../../../middlewares/validators/servers'
16import { followersSortValidator, followingSortValidator } from '../../../middlewares/validators/sort' 16import { followersSortValidator, followingSortValidator } from '../../../middlewares/validators/sort'
17 17
18const applicationFollowsRouter = express.Router() 18const applicationFollowsRouter = express.Router()
diff --git a/server/controllers/api/application/index.ts b/server/controllers/api/server/index.ts
index 011b971ed..011b971ed 100644
--- a/server/controllers/api/application/index.ts
+++ b/server/controllers/api/server/index.ts
diff --git a/server/controllers/api/videos/abuse.ts b/server/controllers/api/videos/abuse.ts
index 7a3471116..29f901f60 100644
--- a/server/controllers/api/videos/abuse.ts
+++ b/server/controllers/api/videos/abuse.ts
@@ -70,12 +70,12 @@ async function reportVideoAbuse (req: express.Request, res: express.Response) {
70 reporterUsername, 70 reporterUsername,
71 reason: body.reason, 71 reason: body.reason,
72 videoId: videoInstance.id, 72 videoId: videoInstance.id,
73 reporterPodId: null // This is our pod that reported this abuse 73 reporterServerId: null // This is our server that reported this abuse
74 } 74 }
75 75
76 await db.sequelize.transaction(async t => { 76 await db.sequelize.transaction(async t => {
77 const abuse = await db.VideoAbuse.create(abuseToCreate, { transaction: t }) 77 const abuse = await db.VideoAbuse.create(abuseToCreate, { transaction: t })
78 // We send the information to the destination pod 78 // We send the information to the destination server
79 if (videoInstance.isOwned() === false) { 79 if (videoInstance.isOwned() === false) {
80 const reportData = { 80 const reportData = {
81 reporterUsername, 81 reporterUsername,
@@ -84,7 +84,7 @@ async function reportVideoAbuse (req: express.Request, res: express.Response) {
84 } 84 }
85 85
86 // await friends.reportAbuseVideoToFriend(reportData, videoInstance, t) 86 // await friends.reportAbuseVideoToFriend(reportData, videoInstance, t)
87 // TODO: send abuse to origin pod 87 // TODO: send abuse to origin server
88 } 88 }
89 }) 89 })
90 90
diff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.ts
index 063839223..ebc07e179 100644
--- a/server/controllers/api/videos/index.ts
+++ b/server/controllers/api/videos/index.ts
@@ -233,7 +233,7 @@ async function addVideo (req: express.Request, res: express.Response, videoPhysi
233 233
234 // Let transcoding job send the video to friends because the video file extension might change 234 // Let transcoding job send the video to friends because the video file extension might change
235 if (CONFIG.TRANSCODING.ENABLED === true) return undefined 235 if (CONFIG.TRANSCODING.ENABLED === true) return undefined
236 // Don't send video to remote pods, it is private 236 // Don't send video to remote servers, it is private
237 if (video.privacy === VideoPrivacy.PRIVATE) return undefined 237 if (video.privacy === VideoPrivacy.PRIVATE) return undefined
238 238
239 await sendAddVideo(video, t) 239 await sendAddVideo(video, t)
@@ -287,7 +287,7 @@ async function updateVideo (req: express.Request, res: express.Response) {
287 await sendUpdateVideoChannel(videoInstance, t) 287 await sendUpdateVideoChannel(videoInstance, t)
288 } 288 }
289 289
290 // Video is not private anymore, send a create action to remote pods 290 // Video is not private anymore, send a create action to remote servers
291 if (wasPrivateVideo === true && videoInstance.privacy !== VideoPrivacy.PRIVATE) { 291 if (wasPrivateVideo === true && videoInstance.privacy !== VideoPrivacy.PRIVATE) {
292 await sendAddVideo(videoInstance, t) 292 await sendAddVideo(videoInstance, t)
293 } 293 }
@@ -365,7 +365,7 @@ async function removeVideo (req: express.Request, res: express.Response) {
365} 365}
366 366
367async function searchVideos (req: express.Request, res: express.Response, next: express.NextFunction) { 367async function searchVideos (req: express.Request, res: express.Response, next: express.NextFunction) {
368 const resultList = await db.Video.searchAndPopulateAccountAndPodAndTags( 368 const resultList = await db.Video.searchAndPopulateAccountAndServerAndTags(
369 req.params.value, 369 req.params.value,
370 req.query.field, 370 req.query.field,
371 req.query.start, 371 req.query.start,
diff --git a/server/controllers/api/videos/rate.ts b/server/controllers/api/videos/rate.ts
index 955277d25..8216dffd2 100644
--- a/server/controllers/api/videos/rate.ts
+++ b/server/controllers/api/videos/rate.ts
@@ -83,7 +83,7 @@ async function rateVideo (req: express.Request, res: express.Response) {
83 await videoInstance.increment(incrementQuery, sequelizeOptions) 83 await videoInstance.increment(incrementQuery, sequelizeOptions)
84 84
85 if (videoInstance.isOwned() === false) { 85 if (videoInstance.isOwned() === false) {
86 // TODO: Send a event to original pod 86 // TODO: Send a event to original server
87 } else { 87 } else {
88 // TODO: Send update to followers 88 // TODO: Send update to followers
89 } 89 }