MCPcopy Create free account
hub / github.com/53AI/53AIHub / DeleteGraphTemplate

Function DeleteGraphTemplate

api/service/graph_template.go:176–188  ·  view source on GitHub ↗

DeleteGraphTemplate 删除模板

(ctx context.Context, eid, templateID int64)

Source from the content-addressed store, hash-verified

174
175// DeleteGraphTemplate 删除模板
176func DeleteGraphTemplate(ctx context.Context, eid, templateID int64) error {
177 err := model.DeleteGraphTemplate(eid, templateID)
178 if err != nil {
179 if err.Error() == "template not found" {
180 return ErrTemplateNotFound
181 }
182 logger.SysError(fmt.Sprintf("Failed to delete graph template: %v", err))
183 return err
184 }
185
186 logger.Info(ctx, fmt.Sprintf("Graph template deleted successfully, template_id: %d", templateID))
187 return nil
188}
189
190// generateEntityPreview 生成实体预览文本
191// 格式: "组织、部门、角色等4个"

Callers

nothing calls this directly

Calls 2

InfoMethod · 0.80
ErrorMethod · 0.45

Tested by

no test coverage detected