diff options
Diffstat (limited to 'ui/src/services/WebSocketService.ts')
-rw-r--r-- | ui/src/services/WebSocketService.ts | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/ui/src/services/WebSocketService.ts b/ui/src/services/WebSocketService.ts index c99cfcfa..d89d0128 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, GetListingsForm, CreatePostLikeForm } from '../interfaces'; +import { LoginForm, RegisterForm, UserOperation, CommunityForm, PostForm, CommentForm, CommentLikeForm, GetPostsForm, CreatePostLikeForm } from '../interfaces'; import { webSocket } from 'rxjs/webSocket'; import { Subject } from 'rxjs'; import { retryWhen, delay, take } from 'rxjs/operators'; @@ -37,6 +37,11 @@ export class WebSocketService { this.subject.next(this.wsSendWrapper(UserOperation.CreateCommunity, communityForm)); } + public editCommunity(communityForm: CommunityForm) { + this.setAuth(communityForm); + this.subject.next(this.wsSendWrapper(UserOperation.EditCommunity, communityForm)); + } + public listCommunities() { this.subject.next(this.wsSendWrapper(UserOperation.ListCommunities, undefined)); } @@ -74,7 +79,7 @@ export class WebSocketService { this.subject.next(this.wsSendWrapper(UserOperation.CreateCommentLike, form)); } - public getPosts(form: GetListingsForm) { + public getPosts(form: GetPostsForm) { this.setAuth(form, false); this.subject.next(this.wsSendWrapper(UserOperation.GetPosts, form)); } |