diff options
Diffstat (limited to 'server/controllers/api/oauth-clients.ts')
-rw-r--r-- | server/controllers/api/oauth-clients.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/controllers/api/oauth-clients.ts b/server/controllers/api/oauth-clients.ts index ac1ee9e36..bc02fce90 100644 --- a/server/controllers/api/oauth-clients.ts +++ b/server/controllers/api/oauth-clients.ts | |||
@@ -3,8 +3,8 @@ import * as express from 'express' | |||
3 | import { CONFIG } from '../../initializers' | 3 | import { CONFIG } from '../../initializers' |
4 | import { logger } from '../../helpers' | 4 | import { logger } from '../../helpers' |
5 | import { asyncMiddleware } from '../../middlewares' | 5 | import { asyncMiddleware } from '../../middlewares' |
6 | import { database as db } from '../../initializers/database' | ||
7 | import { OAuthClientLocal } from '../../../shared' | 6 | import { OAuthClientLocal } from '../../../shared' |
7 | import { OAuthClientModel } from '../../models/oauth/oauth-client' | ||
8 | 8 | ||
9 | const oauthClientsRouter = express.Router() | 9 | const oauthClientsRouter = express.Router() |
10 | 10 | ||
@@ -27,7 +27,7 @@ async function getLocalClient (req: express.Request, res: express.Response, next | |||
27 | return res.type('json').status(403).end() | 27 | return res.type('json').status(403).end() |
28 | } | 28 | } |
29 | 29 | ||
30 | const client = await db.OAuthClient.loadFirstClient() | 30 | const client = await OAuthClientModel.loadFirstClient() |
31 | if (!client) throw new Error('No client available.') | 31 | if (!client) throw new Error('No client available.') |
32 | 32 | ||
33 | const json: OAuthClientLocal = { | 33 | const json: OAuthClientLocal = { |