aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/webfinger.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2017-12-14 17:38:41 +0100
committerChocobozzz <me@florianbigard.com>2017-12-19 10:53:16 +0100
commit50d6de9c286abcb34ff4234d56d9cbb803db7665 (patch)
treef1732b27edcd05c7877a8358b8312f1e38c287ed /server/controllers/webfinger.ts
parentfadf619ad61a016c1c7fc53de5a8f398a4f77519 (diff)
downloadPeerTube-50d6de9c286abcb34ff4234d56d9cbb803db7665.tar.gz
PeerTube-50d6de9c286abcb34ff4234d56d9cbb803db7665.tar.zst
PeerTube-50d6de9c286abcb34ff4234d56d9cbb803db7665.zip
Begin moving video channel to actor
Diffstat (limited to 'server/controllers/webfinger.ts')
-rw-r--r--server/controllers/webfinger.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/controllers/webfinger.ts b/server/controllers/webfinger.ts
index 8829500bc..ed781c21b 100644
--- a/server/controllers/webfinger.ts
+++ b/server/controllers/webfinger.ts
@@ -1,7 +1,7 @@
1import * as express from 'express' 1import * as express from 'express'
2import { asyncMiddleware } from '../middlewares' 2import { asyncMiddleware } from '../middlewares'
3import { webfingerValidator } from '../middlewares/validators' 3import { webfingerValidator } from '../middlewares/validators'
4import { AccountModel } from '../models/account/account' 4import { ActorModel } from '../models/activitypub/actor'
5 5
6const webfingerRouter = express.Router() 6const webfingerRouter = express.Router()
7 7
@@ -19,16 +19,16 @@ export {
19// --------------------------------------------------------------------------- 19// ---------------------------------------------------------------------------
20 20
21function webfingerController (req: express.Request, res: express.Response, next: express.NextFunction) { 21function webfingerController (req: express.Request, res: express.Response, next: express.NextFunction) {
22 const account = res.locals.account as AccountModel 22 const actor = res.locals.actor as ActorModel
23 23
24 const json = { 24 const json = {
25 subject: req.query.resource, 25 subject: req.query.resource,
26 aliases: [ account.Actor.url ], 26 aliases: [ actor.url ],
27 links: [ 27 links: [
28 { 28 {
29 rel: 'self', 29 rel: 'self',
30 type: 'application/activity+json', 30 type: 'application/activity+json',
31 href: account.Actor.url 31 href: actor.url
32 } 32 }
33 ] 33 ]
34 } 34 }