aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-04-24 15:10:54 +0200
committerChocobozzz <me@florianbigard.com>2018-04-24 15:13:19 +0200
commit0626e7af82e02f8a5bd1e74a7d4d8c916d073ceb (patch)
tree79b5befbc6a04c007e5919805f1514d065b30e11 /server/middlewares
parentb4d1af3dd8cdab2d58927e671d62194ca383cd75 (diff)
downloadPeerTube-0626e7af82e02f8a5bd1e74a7d4d8c916d073ceb.tar.gz
PeerTube-0626e7af82e02f8a5bd1e74a7d4d8c916d073ceb.tar.zst
PeerTube-0626e7af82e02f8a5bd1e74a7d4d8c916d073ceb.zip
Add account view
Diffstat (limited to 'server/middlewares')
-rw-r--r--server/middlewares/servers.ts2
-rw-r--r--server/middlewares/validators/webfinger.ts2
2 files changed, 2 insertions, 2 deletions
diff --git a/server/middlewares/servers.ts b/server/middlewares/servers.ts
index a9dcad2d4..c52f4685b 100644
--- a/server/middlewares/servers.ts
+++ b/server/middlewares/servers.ts
@@ -1,6 +1,6 @@
1import * as express from 'express' 1import * as express from 'express'
2import 'express-validator' 2import 'express-validator'
3import { getHostWithPort } from '../helpers/utils' 3import { getHostWithPort } from '../helpers/express-utils'
4 4
5function setBodyHostsPort (req: express.Request, res: express.Response, next: express.NextFunction) { 5function setBodyHostsPort (req: express.Request, res: express.Response, next: express.NextFunction) {
6 if (!req.body.hosts) return next() 6 if (!req.body.hosts) return next()
diff --git a/server/middlewares/validators/webfinger.ts b/server/middlewares/validators/webfinger.ts
index 3dbec6e44..3b9645048 100644
--- a/server/middlewares/validators/webfinger.ts
+++ b/server/middlewares/validators/webfinger.ts
@@ -2,9 +2,9 @@ import * as express from 'express'
2import { query } from 'express-validator/check' 2import { query } from 'express-validator/check'
3import { isWebfingerResourceValid } from '../../helpers/custom-validators/webfinger' 3import { isWebfingerResourceValid } from '../../helpers/custom-validators/webfinger'
4import { logger } from '../../helpers/logger' 4import { logger } from '../../helpers/logger'
5import { getHostWithPort } from '../../helpers/utils'
6import { ActorModel } from '../../models/activitypub/actor' 5import { ActorModel } from '../../models/activitypub/actor'
7import { areValidationErrors } from './utils' 6import { areValidationErrors } from './utils'
7import { getHostWithPort } from '../../helpers/express-utils'
8 8
9const webfingerValidator = [ 9const webfingerValidator = [
10 query('resource').custom(isWebfingerResourceValid).withMessage('Should have a valid webfinger resource'), 10 query('resource').custom(isWebfingerResourceValid).withMessage('Should have a valid webfinger resource'),