diff options
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 | } |