metadata-management #10

Merged
joe merged 18 commits from metadata-management into master 2026-02-26 18:35:33 +00:00
2 changed files with 10 additions and 1 deletions
Showing only changes of commit dbb4c1ed38 - Show all commits

View file

@ -18,6 +18,7 @@ export class CategoriesComponent {
public constructor(private readonly categoryService: CategoryService) { }
public async updateCategory(category: Category): Promise<void> {
console.log('updated category', category); // TODO: Remove
await this.categoryService.updateCategory(category);
await this.categoryService.fetchCategories();
}
}

View file

@ -16,9 +16,17 @@ export class CategoryService {
public async fetchCategories(): Promise<void> {
this.internalCategories.set(await this.http.get<Category[]>(this.categoryPath));
}
public async updateCategory(category: Category): Promise<Category> {
return await this.http.put<Category>(this.categoryPath, category);
}
}
export interface Category {
id: string;
name: string;
}
export interface CreateCategory {
name: string;
}