diff options
author | Dessalines <tyhou13@gmx.com> | 2019-04-04 15:29:14 -0700 |
---|---|---|
committer | Dessalines <tyhou13@gmx.com> | 2019-04-04 15:29:14 -0700 |
commit | ed688f9292f079e04fa5ad22b2505d8a45cb3d46 (patch) | |
tree | f0e99679eab81f0e67d51f5cb43fefc0bb1f3e9f /ui/src/services | |
parent | f3cbe9e6cee4a03d8677414ae29b81a59d31b71c (diff) |
Community editing
- Community editing mostly working. Fixes #26
Diffstat (limited to 'ui/src/services')
-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)); } |