Move models to typescript-sequelize
This commit is contained in:
parent
c893d4514e
commit
3fd3ab2d34
150 changed files with 3676 additions and 5074 deletions
|
@ -1,12 +1,14 @@
|
|||
import { database as db } from '../server/initializers/database'
|
||||
import { getServerAccount } from '../server/helpers/utils'
|
||||
import { getServerAccount } from '../server/helpers'
|
||||
import { initDatabase } from '../server/initializers'
|
||||
import { AccountFollowModel } from '../server/models/account/account-follow'
|
||||
import { VideoModel } from '../server/models/video/video'
|
||||
|
||||
db.init(true)
|
||||
initDatabase(true)
|
||||
.then(() => {
|
||||
return getServerAccount()
|
||||
})
|
||||
.then(serverAccount => {
|
||||
return db.AccountFollow.listAcceptedFollowingUrlsForApi([ serverAccount.id ], undefined)
|
||||
return AccountFollowModel.listAcceptedFollowingUrlsForApi([ serverAccount.id ], undefined)
|
||||
})
|
||||
.then(res => {
|
||||
return res.total > 0
|
||||
|
@ -18,7 +20,7 @@ db.init(true)
|
|||
}
|
||||
|
||||
console.log('Updating torrent files.')
|
||||
return db.Video.list()
|
||||
return VideoModel.list()
|
||||
})
|
||||
.then(videos => {
|
||||
const tasks: Promise<any>[] = []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue