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/helpers/activitypub.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/helpers/activitypub.ts')
-rw-r--r-- | server/helpers/activitypub.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/server/helpers/activitypub.ts b/server/helpers/activitypub.ts index 1ea6422ca..43907b596 100644 --- a/server/helpers/activitypub.ts +++ b/server/helpers/activitypub.ts | |||
@@ -1,8 +1,8 @@ | |||
1 | import { Activity } from '../../shared/models/activitypub/activity' | 1 | import { ResultList } from '../../shared/models' |
2 | import { ResultList } from '../../shared/models/result-list.model' | 2 | import { Activity } from '../../shared/models/activitypub' |
3 | import { AccountInstance } from '../models/account/account-interface' | 3 | import { ACTIVITY_PUB } from '../initializers' |
4 | import { AccountModel } from '../models/account/account' | ||
4 | import { signObject } from './peertube-crypto' | 5 | import { signObject } from './peertube-crypto' |
5 | import { ACTIVITY_PUB } from '../initializers/constants' | ||
6 | 6 | ||
7 | function activityPubContextify <T> (data: T) { | 7 | function activityPubContextify <T> (data: T) { |
8 | return Object.assign(data,{ | 8 | return Object.assign(data,{ |
@@ -71,7 +71,7 @@ function activityPubCollectionPagination (url: string, page: any, result: Result | |||
71 | return orderedCollectionPagination | 71 | return orderedCollectionPagination |
72 | } | 72 | } |
73 | 73 | ||
74 | function buildSignedActivity (byAccount: AccountInstance, data: Object) { | 74 | function buildSignedActivity (byAccount: AccountModel, data: Object) { |
75 | const activity = activityPubContextify(data) | 75 | const activity = activityPubContextify(data) |
76 | 76 | ||
77 | return signObject(byAccount, activity) as Promise<Activity> | 77 | return signObject(byAccount, activity) as Promise<Activity> |