diff options
author | Dessalines <tyhou13@gmx.com> | 2019-04-09 23:19:12 -0700 |
---|---|---|
committer | Dessalines <tyhou13@gmx.com> | 2019-04-09 23:19:12 -0700 |
commit | 3ff85b1fdb0d80f860fe44a24930bffb73c258a0 (patch) | |
tree | 4e78de81b7a58912c7261f70992767ab0aa900a2 /ui/src/services | |
parent | 42939df0406028af1a0f49e6f44f529a4cf9ecba (diff) |
Adding trending communities.
- Fixes #29
- Communities fetching now has sort and limit.
Diffstat (limited to 'ui/src/services')
-rw-r--r-- | ui/src/services/WebSocketService.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ui/src/services/WebSocketService.ts b/ui/src/services/WebSocketService.ts index b5efd6a7..99d65adf 100644 --- a/ui/src/services/WebSocketService.ts +++ b/ui/src/services/WebSocketService.ts @@ -1,5 +1,5 @@ import { wsUri } from '../env'; -import { LoginForm, RegisterForm, UserOperation, CommunityForm, PostForm, CommentForm, CommentLikeForm, GetPostsForm, CreatePostLikeForm, FollowCommunityForm, GetUserDetailsForm } from '../interfaces'; +import { LoginForm, RegisterForm, UserOperation, CommunityForm, PostForm, CommentForm, CommentLikeForm, GetPostsForm, CreatePostLikeForm, FollowCommunityForm, GetUserDetailsForm, ListCommunitiesForm } from '../interfaces'; import { webSocket } from 'rxjs/webSocket'; import { Subject } from 'rxjs'; import { retryWhen, delay, take } from 'rxjs/operators'; @@ -47,9 +47,9 @@ export class WebSocketService { this.subject.next(this.wsSendWrapper(UserOperation.FollowCommunity, followCommunityForm)); } - public listCommunities() { - let data = {auth: UserService.Instance.auth }; - this.subject.next(this.wsSendWrapper(UserOperation.ListCommunities, data)); + public listCommunities(form: ListCommunitiesForm) { + this.setAuth(form, false); + this.subject.next(this.wsSendWrapper(UserOperation.ListCommunities, form)); } public getFollowedCommunities() { |