Method
Edit
(ctx context.Context, id string, input *catalogue_dto.EditCatalogue)
Source from the content-addressed store, hash-verified
| 610 | } |
| 611 | |
| 612 | func (i *imlCatalogueModule) Edit(ctx context.Context, id string, input *catalogue_dto.EditCatalogue) error { |
| 613 | err := i.catalogueService.Save(ctx, id, &catalogue.EditCatalogue{ |
| 614 | Name: input.Name, |
| 615 | Parent: input.Parent, |
| 616 | Sort: input.Sort, |
| 617 | }) |
| 618 | if err != nil { |
| 619 | return err |
| 620 | } |
| 621 | // 重新初始化 |
| 622 | catalogues, err := i.catalogueService.List(ctx) |
| 623 | if err != nil { |
| 624 | return err |
| 625 | } |
| 626 | i.root = NewRoot(catalogues) |
| 627 | return nil |
| 628 | } |
| 629 | |
| 630 | func (i *imlCatalogueModule) Delete(ctx context.Context, id string) error { |
| 631 | if id == "" { |
Callers
nothing calls this directly
Tested by
no test coverage detected