diff options
Diffstat (limited to 'server/middlewares/validators/webfinger.ts')
-rw-r--r-- | server/middlewares/validators/webfinger.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/server/middlewares/validators/webfinger.ts b/server/middlewares/validators/webfinger.ts index 7903c7400..2c8351799 100644 --- a/server/middlewares/validators/webfinger.ts +++ b/server/middlewares/validators/webfinger.ts | |||
@@ -2,7 +2,7 @@ import * as express from 'express' | |||
2 | import { query } from 'express-validator/check' | 2 | import { query } from 'express-validator/check' |
3 | import { logger } from '../../helpers' | 3 | import { logger } from '../../helpers' |
4 | import { isWebfingerResourceValid } from '../../helpers/custom-validators/webfinger' | 4 | import { isWebfingerResourceValid } from '../../helpers/custom-validators/webfinger' |
5 | import { AccountModel } from '../../models/account/account' | 5 | import { ActorModel } from '../../models/activitypub/actor' |
6 | import { areValidationErrors } from './utils' | 6 | import { areValidationErrors } from './utils' |
7 | 7 | ||
8 | const webfingerValidator = [ | 8 | const webfingerValidator = [ |
@@ -17,14 +17,14 @@ const webfingerValidator = [ | |||
17 | const nameWithHost = req.query.resource.substr(5) | 17 | const nameWithHost = req.query.resource.substr(5) |
18 | const [ name ] = nameWithHost.split('@') | 18 | const [ name ] = nameWithHost.split('@') |
19 | 19 | ||
20 | const account = await AccountModel.loadLocalByName(name) | 20 | const actor = await ActorModel.loadLocalByName(name) |
21 | if (!account) { | 21 | if (!actor) { |
22 | return res.status(404) | 22 | return res.status(404) |
23 | .send({ error: 'Account not found' }) | 23 | .send({ error: 'Actor not found' }) |
24 | .end() | 24 | .end() |
25 | } | 25 | } |
26 | 26 | ||
27 | res.locals.account = account | 27 | res.locals.actor = actor |
28 | return next() | 28 | return next() |
29 | } | 29 | } |
30 | ] | 30 | ] |