diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-11-20 11:19:23 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-11-27 19:40:52 +0100 |
commit | 7e9334c34db23e5ad1e118151b24c720dd985984 (patch) | |
tree | 154f5d1db44ff652b793d8e0b7dc1b00a3ddaec1 /server/models/account/account-follow-interface.ts | |
parent | 892211e8493b1f992fce7616cb1e48b7ff87a1dc (diff) | |
download | PeerTube-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.ts | 11 |
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 @@ | |||
1 | import * as Sequelize from 'sequelize' | ||
2 | import * as Bluebird from 'bluebird' | 1 | import * as Bluebird from 'bluebird' |
3 | import { FollowState } from '../../../shared/models/accounts/follow.model' | 2 | import * as Sequelize from 'sequelize' |
3 | import { AccountFollow, FollowState } from '../../../shared/models/accounts/follow.model' | ||
4 | import { ResultList } from '../../../shared/models/result-list.model' | 4 | import { ResultList } from '../../../shared/models/result-list.model' |
5 | import { AccountInstance } from './account-interface' | 5 | import { AccountInstance } from './account-interface' |
6 | 6 | ||
7 | export namespace AccountFollowMethods { | 7 | export 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 | ||
18 | export interface AccountFollowClass { | 19 | export 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 | ||
43 | export interface AccountFollowModel extends AccountFollowClass, Sequelize.Model<AccountFollowInstance, AccountFollowAttributes> {} | 46 | export interface AccountFollowModel extends AccountFollowClass, Sequelize.Model<AccountFollowInstance, AccountFollowAttributes> {} |