summaryrefslogtreecommitdiffstats
path: root/ui/src/services
diff options
context:
space:
mode:
authorDessalines <happydooby@gmail.com>2019-04-09 23:19:12 -0700
committerDessalines <happydooby@gmail.com>2019-04-09 23:19:12 -0700
commit8e5a5d17a877e4167ab8e71253a1c8efbd5f6375 (patch)
tree4e78de81b7a58912c7261f70992767ab0aa900a2 /ui/src/services
parentcbd1d67fea1d012830784594da6c0c210b68bd7b (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.ts8
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() {