Updated posts service to allow for category deletion and subscription retrieval based on name

This commit is contained in:
Isaac Abadi
2020-10-15 16:59:14 -04:00
parent fe7303a191
commit 0a38b01971

View File

@@ -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() {