diff options
author | Chocobozzz <me@florianbigard.com> | 2017-12-14 17:38:41 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2017-12-19 10:53:16 +0100 |
commit | 50d6de9c286abcb34ff4234d56d9cbb803db7665 (patch) | |
tree | f1732b27edcd05c7877a8358b8312f1e38c287ed /server/controllers/webfinger.ts | |
parent | fadf619ad61a016c1c7fc53de5a8f398a4f77519 (diff) | |
download | PeerTube-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.ts | 8 |
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 @@ | |||
1 | import * as express from 'express' | 1 | import * as express from 'express' |
2 | import { asyncMiddleware } from '../middlewares' | 2 | import { asyncMiddleware } from '../middlewares' |
3 | import { webfingerValidator } from '../middlewares/validators' | 3 | import { webfingerValidator } from '../middlewares/validators' |
4 | import { AccountModel } from '../models/account/account' | 4 | import { ActorModel } from '../models/activitypub/actor' |
5 | 5 | ||
6 | const webfingerRouter = express.Router() | 6 | const webfingerRouter = express.Router() |
7 | 7 | ||
@@ -19,16 +19,16 @@ export { | |||
19 | // --------------------------------------------------------------------------- | 19 | // --------------------------------------------------------------------------- |
20 | 20 | ||
21 | function webfingerController (req: express.Request, res: express.Response, next: express.NextFunction) { | 21 | function 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 | } |