Skip to content

Commit bb210ef

Browse files
committed
Add category working
1 parent ff7c0ee commit bb210ef

File tree

2 files changed

+7
-15
lines changed

2 files changed

+7
-15
lines changed

angular/wallypop/.idea/workspace.xml

Lines changed: 2 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

angular/wallypop/src/app/services/category.service.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,17 @@ export class CategoryService {
3232
) as Observable<Category>;
3333
}
3434

35-
addCategory(title: string, description: string, icon: string): Observable<any> {
35+
addCategory(title: string, description: string, icon: string): void {
3636

37-
/*this.httpClient.post(BASE_URL + 'admin/categories', {title, description, icon}, {withCredentials: true})
37+
this.httpClient.post(BASE_URL + 'admin/categories', {title, description, icon}, {withCredentials: true})
3838
.subscribe(
3939
(response) => this.router.navigate(['profile']),
4040
(error) => alert('Usuario ya existe, inicie sesión')
41-
);*/
42-
return this.httpClient.post(BASE_URL + 'admin/categories', {title, description, icon}, {withCredentials: true})
41+
);
42+
/*return this.httpClient.post(BASE_URL + 'admin/categories', {title, description, icon}, {withCredentials: true})
4343
.pipe(
4444
catchError(error => CategoryService.handleError(error))
45-
);
45+
);*/
4646
}
4747

4848
setCategoryImage(category: Category, formData: FormData): Observable<any> {

0 commit comments

Comments
 (0)