added create category support
This commit is contained in:
parent
a8548ce2f4
commit
248ded53c0
5 changed files with 11 additions and 10 deletions
|
|
@ -17,6 +17,10 @@ export class CategoryService {
|
|||
this.internalCategories.set(await this.http.get<Category[]>(this.categoryPath));
|
||||
}
|
||||
|
||||
public async createCategory(category: CreateCategory): Promise<Category> {
|
||||
return await this.http.post<Category>(this.categoryPath, category);
|
||||
}
|
||||
|
||||
public async updateCategory(category: Category): Promise<Category> {
|
||||
return await this.http.put<Category>(this.categoryPath, category);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue