aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/videos
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-07-11 16:01:56 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-07-11 16:01:56 +0200
commit0a6658fdcbd779ada8f3758048c326e997902d5a (patch)
tree5de40bf901db0299011104b1344783637b964eb0 /server/controllers/api/videos
parente6d4b0ff2404dcf0b3a755c3fcc415ffeb6e754d (diff)
downloadPeerTube-0a6658fdcbd779ada8f3758048c326e997902d5a.tar.gz
PeerTube-0a6658fdcbd779ada8f3758048c326e997902d5a.tar.zst
PeerTube-0a6658fdcbd779ada8f3758048c326e997902d5a.zip
Use global uuid instead of remoteId for videos
Diffstat (limited to 'server/controllers/api/videos')
-rw-r--r--server/controllers/api/videos/abuse.ts4
-rw-r--r--server/controllers/api/videos/index.ts2
-rw-r--r--server/controllers/api/videos/rate.ts2
3 files changed, 4 insertions, 4 deletions
diff --git a/server/controllers/api/videos/abuse.ts b/server/controllers/api/videos/abuse.ts
index 7d2e3bcfb..5cf0303fb 100644
--- a/server/controllers/api/videos/abuse.ts
+++ b/server/controllers/api/videos/abuse.ts
@@ -62,7 +62,7 @@ function reportVideoAbuseRetryWrapper (req: express.Request, res: express.Respon
62} 62}
63 63
64function reportVideoAbuse (req: express.Request, res: express.Response) { 64function reportVideoAbuse (req: express.Request, res: express.Response) {
65 const videoInstance = res.locals.video 65 const videoInstance = res.locals.video as VideoInstance
66 const reporterUsername = res.locals.oauth.token.User.username 66 const reporterUsername = res.locals.oauth.token.User.username
67 const body: VideoAbuseCreate = req.body 67 const body: VideoAbuseCreate = req.body
68 68
@@ -81,7 +81,7 @@ function reportVideoAbuse (req: express.Request, res: express.Response) {
81 const reportData = { 81 const reportData = {
82 reporterUsername, 82 reporterUsername,
83 reportReason: abuse.reason, 83 reportReason: abuse.reason,
84 videoRemoteId: videoInstance.remoteId 84 videoUUID: videoInstance.uuid
85 } 85 }
86 86
87 return friends.reportAbuseVideoToFriend(reportData, videoInstance, t).then(() => videoInstance) 87 return friends.reportAbuseVideoToFriend(reportData, videoInstance, t).then(() => videoInstance)
diff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.ts
index 4ae7ea2ed..e70a5319e 100644
--- a/server/controllers/api/videos/index.ts
+++ b/server/controllers/api/videos/index.ts
@@ -176,7 +176,7 @@ function addVideo (req: express.Request, res: express.Response, videoFile: Expre
176 .then(({ author, tagInstances }) => { 176 .then(({ author, tagInstances }) => {
177 const videoData = { 177 const videoData = {
178 name: videoInfos.name, 178 name: videoInfos.name,
179 remoteId: null, 179 remote: false,
180 extname: path.extname(videoFile.filename), 180 extname: path.extname(videoFile.filename),
181 category: videoInfos.category, 181 category: videoInfos.category,
182 licence: videoInfos.licence, 182 licence: videoInfos.licence,
diff --git a/server/controllers/api/videos/rate.ts b/server/controllers/api/videos/rate.ts
index 8456cbaf2..6ddc69817 100644
--- a/server/controllers/api/videos/rate.ts
+++ b/server/controllers/api/videos/rate.ts
@@ -69,7 +69,7 @@ function rateVideo (req: express.Request, res: express.Response) {
69 69
70 // There was a previous rate, update it 70 // There was a previous rate, update it
71 if (previousRate) { 71 if (previousRate) {
72 // We will remove the previous rate, so we will need to remove it from the video attribute 72 // We will remove the previous rate, so we will need to update the video count attribute
73 if (previousRate.type === VIDEO_RATE_TYPES.LIKE) likesToIncrement-- 73 if (previousRate.type === VIDEO_RATE_TYPES.LIKE) likesToIncrement--
74 else if (previousRate.type === VIDEO_RATE_TYPES.DISLIKE) dislikesToIncrement-- 74 else if (previousRate.type === VIDEO_RATE_TYPES.DISLIKE) dislikesToIncrement--
75 75