aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/account/account-follow-interface.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-11-20 11:19:23 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-11-27 19:40:52 +0100
commit7e9334c34db23e5ad1e118151b24c720dd985984 (patch)
tree154f5d1db44ff652b793d8e0b7dc1b00a3ddaec1 /server/models/account/account-follow-interface.ts
parent892211e8493b1f992fce7616cb1e48b7ff87a1dc (diff)
downloadPeerTube-7e9334c34db23e5ad1e118151b24c720dd985984.tar.gz
PeerTube-7e9334c34db23e5ad1e118151b24c720dd985984.tar.zst
PeerTube-7e9334c34db23e5ad1e118151b24c720dd985984.zip
Add ability to unfollow a server
Diffstat (limited to 'server/models/account/account-follow-interface.ts')
-rw-r--r--server/models/account/account-follow-interface.ts11
1 files changed, 7 insertions, 4 deletions
diff --git a/server/models/account/account-follow-interface.ts b/server/models/account/account-follow-interface.ts
index 21fda98ce..6f228c790 100644
--- a/server/models/account/account-follow-interface.ts
+++ b/server/models/account/account-follow-interface.ts
@@ -1,18 +1,19 @@
1import * as Sequelize from 'sequelize'
2import * as Bluebird from 'bluebird' 1import * as Bluebird from 'bluebird'
3import { FollowState } from '../../../shared/models/accounts/follow.model' 2import * as Sequelize from 'sequelize'
3import { AccountFollow, FollowState } from '../../../shared/models/accounts/follow.model'
4import { ResultList } from '../../../shared/models/result-list.model' 4import { ResultList } from '../../../shared/models/result-list.model'
5import { AccountInstance } from './account-interface' 5import { AccountInstance } from './account-interface'
6 6
7export namespace AccountFollowMethods { 7export namespace AccountFollowMethods {
8 export type LoadByAccountAndTarget = (accountId: number, targetAccountId: number) => Bluebird<AccountFollowInstance> 8 export type LoadByAccountAndTarget = (accountId: number, targetAccountId: number) => Bluebird<AccountFollowInstance>
9 9
10 export type ListFollowingForApi = (id: number, start: number, count: number, sort: string) => Bluebird< ResultList<AccountInstance> > 10 export type ListFollowingForApi = (id: number, start: number, count: number, sort: string) => Bluebird< ResultList<AccountFollowInstance>>
11 export type ListFollowersForApi = (id: number, start: number, count: number, sort: string) => Bluebird< ResultList<AccountInstance> > 11 export type ListFollowersForApi = (id: number, start: number, count: number, sort: string) => Bluebird< ResultList<AccountFollowInstance>>
12 12
13 export type ListAcceptedFollowerUrlsForApi = (accountId: number[], start?: number, count?: number) => Promise< ResultList<string> > 13 export type ListAcceptedFollowerUrlsForApi = (accountId: number[], start?: number, count?: number) => Promise< ResultList<string> >
14 export type ListAcceptedFollowingUrlsForApi = (accountId: number[], start?: number, count?: number) => Promise< ResultList<string> > 14 export type ListAcceptedFollowingUrlsForApi = (accountId: number[], start?: number, count?: number) => Promise< ResultList<string> >
15 export type ListAcceptedFollowerSharedInboxUrls = (accountId: number[]) => Promise< ResultList<string> > 15 export type ListAcceptedFollowerSharedInboxUrls = (accountId: number[]) => Promise< ResultList<string> >
16 export type ToFormattedJSON = (this: AccountFollowInstance) => AccountFollow
16} 17}
17 18
18export interface AccountFollowClass { 19export interface AccountFollowClass {
@@ -38,6 +39,8 @@ export interface AccountFollowInstance extends AccountFollowClass, AccountFollow
38 39
39 AccountFollower?: AccountInstance 40 AccountFollower?: AccountInstance
40 AccountFollowing?: AccountInstance 41 AccountFollowing?: AccountInstance
42
43 toFormattedJSON: AccountFollowMethods.ToFormattedJSON
41} 44}
42 45
43export interface AccountFollowModel extends AccountFollowClass, Sequelize.Model<AccountFollowInstance, AccountFollowAttributes> {} 46export interface AccountFollowModel extends AccountFollowClass, Sequelize.Model<AccountFollowInstance, AccountFollowAttributes> {}