MCPcopy Index your code
hub / github.com/APIParkLab/APIPark / Edit

Method Edit

module/catalogue/iml.go:612–628  ·  view source on GitHub ↗
(ctx context.Context, id string, input *catalogue_dto.EditCatalogue)

Source from the content-addressed store, hash-verified

610}
611
612func (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
630func (i *imlCatalogueModule) Delete(ctx context.Context, id string) error {
631 if id == "" {

Callers

nothing calls this directly

Calls 3

NewRootFunction · 0.85
SaveMethod · 0.65
ListMethod · 0.65

Tested by

no test coverage detected