aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators/webfinger.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/middlewares/validators/webfinger.ts')
-rw-r--r--server/middlewares/validators/webfinger.ts10
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'
2import { query } from 'express-validator/check' 2import { query } from 'express-validator/check'
3import { logger } from '../../helpers' 3import { logger } from '../../helpers'
4import { isWebfingerResourceValid } from '../../helpers/custom-validators/webfinger' 4import { isWebfingerResourceValid } from '../../helpers/custom-validators/webfinger'
5import { AccountModel } from '../../models/account/account' 5import { ActorModel } from '../../models/activitypub/actor'
6import { areValidationErrors } from './utils' 6import { areValidationErrors } from './utils'
7 7
8const webfingerValidator = [ 8const 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]