diff options
author | Chocobozzz <me@florianbigard.com> | 2017-12-12 17:53:50 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2017-12-13 16:50:33 +0100 |
commit | 3fd3ab2d34d512b160a5e6084d7609be7b4f4452 (patch) | |
tree | e5ca358287fca6ecacce83defcf23af1e8e9f419 /server/controllers/api/oauth-clients.ts | |
parent | c893d4514e6ecbf282c7985fe5f82b8acd8a1137 (diff) | |
download | PeerTube-3fd3ab2d34d512b160a5e6084d7609be7b4f4452.tar.gz PeerTube-3fd3ab2d34d512b160a5e6084d7609be7b4f4452.tar.zst PeerTube-3fd3ab2d34d512b160a5e6084d7609be7b4f4452.zip |
Move models to typescript-sequelize
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 = { |