mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 19:42:24 +02:00
Move models to typescript-sequelize
This commit is contained in:
parent
c893d4514e
commit
3fd3ab2d34
150 changed files with 3676 additions and 5074 deletions
|
@ -1,8 +1,8 @@
|
|||
import { Activity } from '../../shared/models/activitypub/activity'
|
||||
import { ResultList } from '../../shared/models/result-list.model'
|
||||
import { AccountInstance } from '../models/account/account-interface'
|
||||
import { ResultList } from '../../shared/models'
|
||||
import { Activity } from '../../shared/models/activitypub'
|
||||
import { ACTIVITY_PUB } from '../initializers'
|
||||
import { AccountModel } from '../models/account/account'
|
||||
import { signObject } from './peertube-crypto'
|
||||
import { ACTIVITY_PUB } from '../initializers/constants'
|
||||
|
||||
function activityPubContextify <T> (data: T) {
|
||||
return Object.assign(data,{
|
||||
|
@ -71,7 +71,7 @@ function activityPubCollectionPagination (url: string, page: any, result: Result
|
|||
return orderedCollectionPagination
|
||||
}
|
||||
|
||||
function buildSignedActivity (byAccount: AccountInstance, data: Object) {
|
||||
function buildSignedActivity (byAccount: AccountModel, data: Object) {
|
||||
const activity = activityPubContextify(data)
|
||||
|
||||
return signObject(byAccount, activity) as Promise<Activity>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue