From 0a38b0197120ff4016dd83edeeef4bec0a2a5483 Mon Sep 17 00:00:00 2001 From: Isaac Abadi Date: Thu, 15 Oct 2020 16:59:14 -0400 Subject: [PATCH] Updated posts service to allow for category deletion and subscription retrieval based on name --- src/app/posts.services.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/app/posts.services.ts b/src/app/posts.services.ts index 3e45e81..f65af2e 100644 --- a/src/app/posts.services.ts +++ b/src/app/posts.services.ts @@ -304,10 +304,13 @@ export class PostsService implements CanActivate { } createCategory(name) { - console.log(name); return this.http.post(this.path + 'createCategory', {name: name}, this.httpOptions); } + deleteCategory(category_uid) { + return this.http.post(this.path + 'deleteCategory', {category_uid: category_uid}, this.httpOptions); + } + updateCategory(category) { return this.http.post(this.path + 'updateCategory', {category: category}, this.httpOptions); } @@ -340,8 +343,8 @@ export class PostsService implements CanActivate { file_uid: file_uid}, this.httpOptions) } - getSubscription(id) { - return this.http.post(this.path + 'getSubscription', {id: id}, this.httpOptions); + getSubscription(id, name = null) { + return this.http.post(this.path + 'getSubscription', {id: id, name: name}, this.httpOptions); } getAllSubscriptions() {