aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/feeds.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-06-03 17:33:44 +0200
committerChocobozzz <me@florianbigard.com>2021-06-03 18:03:36 +0200
commit10363c74c1d869f0e0c7bc4d0367b1f34d1bb6a4 (patch)
tree008f8dad8032684f46105a261b27b2d6f05b36eb /server/middlewares/validators/feeds.ts
parent5e08989ede1a340b9edb94465a11b1e04bf24094 (diff)
downloadPeerTube-10363c74c1d869f0e0c7bc4d0367b1f34d1bb6a4.tar.gz
PeerTube-10363c74c1d869f0e0c7bc4d0367b1f34d1bb6a4.tar.zst
PeerTube-10363c74c1d869f0e0c7bc4d0367b1f34d1bb6a4.zip
Move middleware utils in middlewares
helpers modules should not import models
Diffstat (limited to 'server/middlewares/validators/feeds.ts')
-rw-r--r--server/middlewares/validators/feeds.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/server/middlewares/validators/feeds.ts b/server/middlewares/validators/feeds.ts
index aa16cc993..51e6d6fff 100644
--- a/server/middlewares/validators/feeds.ts
+++ b/server/middlewares/validators/feeds.ts
@@ -1,18 +1,18 @@
1import * as express from 'express' 1import * as express from 'express'
2import { param, query } from 'express-validator' 2import { param, query } from 'express-validator'
3import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes'
3import { isValidRSSFeed } from '../../helpers/custom-validators/feeds' 4import { isValidRSSFeed } from '../../helpers/custom-validators/feeds'
4import { exists, isIdOrUUIDValid, isIdValid } from '../../helpers/custom-validators/misc' 5import { exists, isIdOrUUIDValid, isIdValid } from '../../helpers/custom-validators/misc'
5import { logger } from '../../helpers/logger' 6import { logger } from '../../helpers/logger'
6import { 7import {
8 areValidationErrors,
7 doesAccountIdExist, 9 doesAccountIdExist,
8 doesAccountNameWithHostExist, 10 doesAccountNameWithHostExist,
9 doesUserFeedTokenCorrespond, 11 doesUserFeedTokenCorrespond,
10 doesVideoChannelIdExist, 12 doesVideoChannelIdExist,
11 doesVideoChannelNameWithHostExist 13 doesVideoChannelNameWithHostExist,
12} from '../../helpers/middlewares' 14 doesVideoExist
13import { doesVideoExist } from '../../helpers/middlewares/videos' 15} from './shared'
14import { areValidationErrors } from './utils'
15import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes'
16 16
17const feedsFormatValidator = [ 17const feedsFormatValidator = [
18 param('format').optional().custom(isValidRSSFeed).withMessage('Should have a valid format (rss, atom, json)'), 18 param('format').optional().custom(isValidRSSFeed).withMessage('Should have a valid format (rss, atom, json)'),