]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/middlewares/validators/webfinger.ts
Cleanup server fixme
[github/Chocobozzz/PeerTube.git] / server / middlewares / validators / webfinger.ts
index d50e6527fe4ac7ab3d9764c6372e90b96df91163..5fe864f8b6a62233d0352be6c6a11e4fa41727d2 100644 (file)
@@ -18,15 +18,14 @@ const webfingerValidator = [
     const nameWithHost = getHostWithPort(req.query.resource.substr(5))
     const [ name ] = nameWithHost.split('@')
 
-    // FIXME: we don't need the full actor
-    const actor = await ActorModel.loadLocalByName(name)
+    const actor = await ActorModel.loadLocalUrlByName(name)
     if (!actor) {
       return res.status(404)
         .send({ error: 'Actor not found' })
         .end()
     }
 
-    res.locals.actorFull = actor
+    res.locals.actorUrl = actor
     return next()
   }
 ]