diff options
author | Chocobozzz <me@florianbigard.com> | 2019-05-31 14:02:26 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-05-31 14:49:31 +0200 |
commit | 57cfff78858b2360d9e038e2a504b761cb51da47 (patch) | |
tree | 28575a83f1680f9c40f04b8a71b4f2eb35f90400 /server/middlewares/validators/feeds.ts | |
parent | 4c72c1cd411b4ff7ed054b584f184117bae91d5b (diff) | |
download | PeerTube-57cfff78858b2360d9e038e2a504b761cb51da47.tar.gz PeerTube-57cfff78858b2360d9e038e2a504b761cb51da47.tar.zst PeerTube-57cfff78858b2360d9e038e2a504b761cb51da47.zip |
Remove unused actor uuid field
Diffstat (limited to 'server/middlewares/validators/feeds.ts')
-rw-r--r-- | server/middlewares/validators/feeds.ts | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/server/middlewares/validators/feeds.ts b/server/middlewares/validators/feeds.ts index e4f5c98fe..dd362619d 100644 --- a/server/middlewares/validators/feeds.ts +++ b/server/middlewares/validators/feeds.ts | |||
@@ -1,21 +1,20 @@ | |||
1 | import * as express from 'express' | 1 | import * as express from 'express' |
2 | import { param, query } from 'express-validator/check' | 2 | import { param, query } from 'express-validator/check' |
3 | import { doesAccountIdExist, isAccountNameValid, doesAccountNameWithHostExist } from '../../helpers/custom-validators/accounts' | 3 | import { doesAccountIdExist, doesAccountNameWithHostExist } from '../../helpers/custom-validators/accounts' |
4 | import { isIdOrUUIDValid } from '../../helpers/custom-validators/misc' | 4 | import { isIdOrUUIDValid, isIdValid } from '../../helpers/custom-validators/misc' |
5 | import { logger } from '../../helpers/logger' | 5 | import { logger } from '../../helpers/logger' |
6 | import { areValidationErrors } from './utils' | 6 | import { areValidationErrors } from './utils' |
7 | import { isValidRSSFeed } from '../../helpers/custom-validators/feeds' | 7 | import { isValidRSSFeed } from '../../helpers/custom-validators/feeds' |
8 | import { doesVideoChannelIdExist, doesVideoChannelNameWithHostExist } from '../../helpers/custom-validators/video-channels' | 8 | import { doesVideoChannelIdExist, doesVideoChannelNameWithHostExist } from '../../helpers/custom-validators/video-channels' |
9 | import { doesVideoExist } from '../../helpers/custom-validators/videos' | 9 | import { doesVideoExist } from '../../helpers/custom-validators/videos' |
10 | import { isActorPreferredUsernameValid } from '../../helpers/custom-validators/activitypub/actor' | ||
11 | 10 | ||
12 | const videoFeedsValidator = [ | 11 | const videoFeedsValidator = [ |
13 | param('format').optional().custom(isValidRSSFeed).withMessage('Should have a valid format (rss, atom, json)'), | 12 | param('format').optional().custom(isValidRSSFeed).withMessage('Should have a valid format (rss, atom, json)'), |
14 | query('format').optional().custom(isValidRSSFeed).withMessage('Should have a valid format (rss, atom, json)'), | 13 | query('format').optional().custom(isValidRSSFeed).withMessage('Should have a valid format (rss, atom, json)'), |
15 | query('accountId').optional().custom(isIdOrUUIDValid), | 14 | query('accountId').optional().custom(isIdValid), |
16 | query('accountName').optional().custom(isAccountNameValid), | 15 | query('accountName').optional(), |
17 | query('videoChannelId').optional().custom(isIdOrUUIDValid), | 16 | query('videoChannelId').optional().custom(isIdValid), |
18 | query('videoChannelName').optional().custom(isActorPreferredUsernameValid), | 17 | query('videoChannelName').optional(), |
19 | 18 | ||
20 | async (req: express.Request, res: express.Response, next: express.NextFunction) => { | 19 | async (req: express.Request, res: express.Response, next: express.NextFunction) => { |
21 | logger.debug('Checking feeds parameters', { parameters: req.query }) | 20 | logger.debug('Checking feeds parameters', { parameters: req.query }) |