aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-11-15 11:00:25 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-11-27 19:40:51 +0100
commit608624252466acf9f1d9ee1c1170bd4fe4d18d18 (patch)
tree47eab55bb5421b7fe88e0b2ac743a436fd9561cf /server/middlewares/validators
parent51548b31815c6f96f314ae96588a9adca150519d (diff)
downloadPeerTube-608624252466acf9f1d9ee1c1170bd4fe4d18d18.tar.gz
PeerTube-608624252466acf9f1d9ee1c1170bd4fe4d18d18.tar.zst
PeerTube-608624252466acf9f1d9ee1c1170bd4fe4d18d18.zip
Rename Pod -> Server
Diffstat (limited to 'server/middlewares/validators')
-rw-r--r--server/middlewares/validators/index.ts2
-rw-r--r--server/middlewares/validators/servers.ts (renamed from server/middlewares/validators/pods.ts)2
-rw-r--r--server/middlewares/validators/video-channels.ts4
-rw-r--r--server/middlewares/validators/videos.ts4
4 files changed, 6 insertions, 6 deletions
diff --git a/server/middlewares/validators/index.ts b/server/middlewares/validators/index.ts
index 92a4bad28..3f5afe5b3 100644
--- a/server/middlewares/validators/index.ts
+++ b/server/middlewares/validators/index.ts
@@ -2,7 +2,7 @@ export * from './account'
2export * from './oembed' 2export * from './oembed'
3export * from './activitypub' 3export * from './activitypub'
4export * from './pagination' 4export * from './pagination'
5export * from './pods' 5export * from './servers'
6export * from './sort' 6export * from './sort'
7export * from './users' 7export * from './users'
8export * from './videos' 8export * from './videos'
diff --git a/server/middlewares/validators/pods.ts b/server/middlewares/validators/servers.ts
index e17369a6f..95b69b789 100644
--- a/server/middlewares/validators/pods.ts
+++ b/server/middlewares/validators/servers.ts
@@ -1,6 +1,6 @@
1import * as express from 'express' 1import * as express from 'express'
2import { body } from 'express-validator/check' 2import { body } from 'express-validator/check'
3import { isEachUniqueHostValid } from '../../helpers/custom-validators/pods' 3import { isEachUniqueHostValid } from '../../helpers/custom-validators/servers'
4import { isTestInstance } from '../../helpers/core-utils' 4import { isTestInstance } from '../../helpers/core-utils'
5import { CONFIG } from '../../initializers/constants' 5import { CONFIG } from '../../initializers/constants'
6import { logger } from '../../helpers/logger' 6import { logger } from '../../helpers/logger'
diff --git a/server/middlewares/validators/video-channels.ts b/server/middlewares/validators/video-channels.ts
index 53416a857..f0ead24e3 100644
--- a/server/middlewares/validators/video-channels.ts
+++ b/server/middlewares/validators/video-channels.ts
@@ -50,7 +50,7 @@ const videoChannelsUpdateValidator = [
50 // We need to make additional checks 50 // We need to make additional checks
51 if (res.locals.videoChannel.isOwned() === false) { 51 if (res.locals.videoChannel.isOwned() === false) {
52 return res.status(403) 52 return res.status(403)
53 .json({ error: 'Cannot update video channel of another pod' }) 53 .json({ error: 'Cannot update video channel of another server' })
54 .end() 54 .end()
55 } 55 }
56 56
@@ -113,7 +113,7 @@ function checkUserCanDeleteVideoChannel (res: express.Response, callback: () =>
113 // Retrieve the user who did the request 113 // Retrieve the user who did the request
114 if (res.locals.videoChannel.isOwned() === false) { 114 if (res.locals.videoChannel.isOwned() === false) {
115 return res.status(403) 115 return res.status(403)
116 .json({ error: 'Cannot remove video channel of another pod.' }) 116 .json({ error: 'Cannot remove video channel of another server.' })
117 .end() 117 .end()
118 } 118 }
119 119
diff --git a/server/middlewares/validators/videos.ts b/server/middlewares/validators/videos.ts
index 10b426df3..158b475e3 100644
--- a/server/middlewares/validators/videos.ts
+++ b/server/middlewares/validators/videos.ts
@@ -127,7 +127,7 @@ const videosUpdateValidator = [
127 // We need to make additional checks 127 // We need to make additional checks
128 if (video.isOwned() === false) { 128 if (video.isOwned() === false) {
129 return res.status(403) 129 return res.status(403)
130 .json({ error: 'Cannot update video of another pod' }) 130 .json({ error: 'Cannot update video of another server' })
131 .end() 131 .end()
132 } 132 }
133 133
@@ -250,7 +250,7 @@ function checkUserCanDeleteVideo (userId: number, res: express.Response, callbac
250 // Retrieve the user who did the request 250 // Retrieve the user who did the request
251 if (res.locals.video.isOwned() === false) { 251 if (res.locals.video.isOwned() === false) {
252 return res.status(403) 252 return res.status(403)
253 .json({ error: 'Cannot remove video of another pod, blacklist it' }) 253 .json({ error: 'Cannot remove video of another server, blacklist it' })
254 .end() 254 .end()
255 } 255 }
256 256