1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-03 17:59:37 +02:00

Move models to typescript-sequelize

This commit is contained in:
Chocobozzz 2017-12-12 17:53:50 +01:00
parent c893d4514e
commit 3fd3ab2d34
No known key found for this signature in database
GPG key ID: 583A612D890159BE
150 changed files with 3676 additions and 5074 deletions

View file

@ -3,8 +3,8 @@ import * as express from 'express'
import { CONFIG } from '../../initializers'
import { logger } from '../../helpers'
import { asyncMiddleware } from '../../middlewares'
import { database as db } from '../../initializers/database'
import { OAuthClientLocal } from '../../../shared'
import { OAuthClientModel } from '../../models/oauth/oauth-client'
const oauthClientsRouter = express.Router()
@ -27,7 +27,7 @@ async function getLocalClient (req: express.Request, res: express.Response, next
return res.type('json').status(403).end()
}
const client = await db.OAuthClient.loadFirstClient()
const client = await OAuthClientModel.loadFirstClient()
if (!client) throw new Error('No client available.')
const json: OAuthClientLocal = {