1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-06 03:50:26 +02:00

Add follow tabs

Following
Follow
Followers
This commit is contained in:
Chocobozzz 2017-11-15 10:10:41 +01:00
parent 350e31d6b6
commit 51548b3181
No known key found for this signature in database
GPG key ID: 583A612D890159BE
44 changed files with 494 additions and 396 deletions

View file

@ -1,13 +1,26 @@
import * as Sequelize from 'sequelize'
import * as Bluebird from 'bluebird'
import { FollowState } from '../../../shared/models/accounts/follow.model'
import { ResultList } from '../../../shared/models/result-list.model'
import { AccountInstance } from './account-interface'
export namespace AccountFollowMethods {
export type LoadByAccountAndTarget = (accountId: number, targetAccountId: number) => Bluebird<AccountFollowInstance>
export type ListFollowingForApi = (id: number, start: number, count: number, sort: string) => Bluebird< ResultList<AccountInstance> >
export type ListFollowersForApi = (id: number, start: number, count: number, sort: string) => Bluebird< ResultList<AccountInstance> >
export type ListAcceptedFollowerUrlsForApi = (id: number, start: number, count?: number) => Promise< ResultList<string> >
export type ListAcceptedFollowingUrlsForApi = (id: number, start: number, count?: number) => Promise< ResultList<string> >
}
export interface AccountFollowClass {
loadByAccountAndTarget: AccountFollowMethods.LoadByAccountAndTarget
listFollowersForApi: AccountFollowMethods.ListFollowersForApi
listFollowingForApi: AccountFollowMethods.ListFollowingForApi
listAcceptedFollowerUrlsForApi: AccountFollowMethods.ListAcceptedFollowerUrlsForApi
listAcceptedFollowingUrlsForApi: AccountFollowMethods.ListAcceptedFollowingUrlsForApi
}
export interface AccountFollowAttributes {
@ -20,6 +33,9 @@ export interface AccountFollowInstance extends AccountFollowClass, AccountFollow
id: number
createdAt: Date
updatedAt: Date
AccountFollower?: AccountInstance
AccountFollowing?: AccountInstance
}
export interface AccountFollowModel extends AccountFollowClass, Sequelize.Model<AccountFollowInstance, AccountFollowAttributes> {}