aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api/oauth-clients.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2017-12-12 17:53:50 +0100
committerChocobozzz <me@florianbigard.com>2017-12-13 16:50:33 +0100
commit3fd3ab2d34d512b160a5e6084d7609be7b4f4452 (patch)
treee5ca358287fca6ecacce83defcf23af1e8e9f419 /server/controllers/api/oauth-clients.ts
parentc893d4514e6ecbf282c7985fe5f82b8acd8a1137 (diff)
downloadPeerTube-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.ts4
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'
3import { CONFIG } from '../../initializers' 3import { CONFIG } from '../../initializers'
4import { logger } from '../../helpers' 4import { logger } from '../../helpers'
5import { asyncMiddleware } from '../../middlewares' 5import { asyncMiddleware } from '../../middlewares'
6import { database as db } from '../../initializers/database'
7import { OAuthClientLocal } from '../../../shared' 6import { OAuthClientLocal } from '../../../shared'
7import { OAuthClientModel } from '../../models/oauth/oauth-client'
8 8
9const oauthClientsRouter = express.Router() 9const 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 = {