From 3fd3ab2d34d512b160a5e6084d7609be7b4f4452 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 12 Dec 2017 17:53:50 +0100 Subject: Move models to typescript-sequelize --- server/middlewares/validators/webfinger.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'server/middlewares/validators/webfinger.ts') diff --git a/server/middlewares/validators/webfinger.ts b/server/middlewares/validators/webfinger.ts index 34e62c66d..7903c7400 100644 --- a/server/middlewares/validators/webfinger.ts +++ b/server/middlewares/validators/webfinger.ts @@ -1,8 +1,8 @@ import * as express from 'express' import { query } from 'express-validator/check' +import { logger } from '../../helpers' import { isWebfingerResourceValid } from '../../helpers/custom-validators/webfinger' -import { logger } from '../../helpers/logger' -import { database as db } from '../../initializers' +import { AccountModel } from '../../models/account/account' import { areValidationErrors } from './utils' const webfingerValidator = [ @@ -17,7 +17,7 @@ const webfingerValidator = [ const nameWithHost = req.query.resource.substr(5) const [ name ] = nameWithHost.split('@') - const account = await db.Account.loadLocalByName(name) + const account = await AccountModel.loadLocalByName(name) if (!account) { return res.status(404) .send({ error: 'Account not found' }) -- cgit v1.2.3