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

Function GetGraphTemplateDetail

api/service/graph_template.go:162–173  ·  view source on GitHub ↗

GetGraphTemplateDetail 获取模板详情

(ctx context.Context, eid, templateID int64)

Source from the content-addressed store, hash-verified

160
161// GetGraphTemplateDetail 获取模板详情
162func GetGraphTemplateDetail(ctx context.Context, eid, templateID int64) (*model.GraphTemplate, error) {
163 template, err := model.GetGraphTemplateByID(eid, templateID)
164 if err != nil {
165 if err.Error() == "record not found" {
166 return nil, ErrTemplateNotFound
167 }
168 logger.SysError(fmt.Sprintf("Failed to get graph template detail: %v", err))
169 return nil, err
170 }
171
172 return template, nil
173}
174
175// DeleteGraphTemplate 删除模板
176func DeleteGraphTemplate(ctx context.Context, eid, templateID int64) error {

Callers

nothing calls this directly

Calls 1

ErrorMethod · 0.45

Tested by

no test coverage detected