aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-01-28 14:45:17 +0100
committerChocobozzz <me@florianbigard.com>2020-01-28 14:45:17 +0100
commit0374b6b5cd685316f924874b2a3068bb345eb0dd (patch)
tree43731106158cd37cc616d0801fcc2681befc9708 /server/middlewares/validators
parent2f1756a03ccf3546f9bbcd98bc149e350d3d950a (diff)
downloadPeerTube-0374b6b5cd685316f924874b2a3068bb345eb0dd.tar.gz
PeerTube-0374b6b5cd685316f924874b2a3068bb345eb0dd.tar.zst
PeerTube-0374b6b5cd685316f924874b2a3068bb345eb0dd.zip
Cleanup server fixme
Diffstat (limited to 'server/middlewares/validators')
-rw-r--r--server/middlewares/validators/webfinger.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/server/middlewares/validators/webfinger.ts b/server/middlewares/validators/webfinger.ts
index d50e6527f..5fe864f8b 100644
--- a/server/middlewares/validators/webfinger.ts
+++ b/server/middlewares/validators/webfinger.ts
@@ -18,15 +18,14 @@ const webfingerValidator = [
18 const nameWithHost = getHostWithPort(req.query.resource.substr(5)) 18 const nameWithHost = getHostWithPort(req.query.resource.substr(5))
19 const [ name ] = nameWithHost.split('@') 19 const [ name ] = nameWithHost.split('@')
20 20
21 // FIXME: we don't need the full actor 21 const actor = await ActorModel.loadLocalUrlByName(name)
22 const actor = await ActorModel.loadLocalByName(name)
23 if (!actor) { 22 if (!actor) {
24 return res.status(404) 23 return res.status(404)
25 .send({ error: 'Actor not found' }) 24 .send({ error: 'Actor not found' })
26 .end() 25 .end()
27 } 26 }
28 27
29 res.locals.actorFull = actor 28 res.locals.actorUrl = actor
30 return next() 29 return next()
31 } 30 }
32] 31]