MCPcopy Create free account
hub / github.com/GoSimplicity/LinkMe / UpdateApi

Method UpdateApi

internal/service/api.go:53–60  ·  view source on GitHub ↗

UpdateApi 更新API信息

(ctx context.Context, api *domain.Api)

Source from the content-addressed store, hash-verified

51
52// UpdateApi 更新API信息
53func (a *apiService) UpdateApi(ctx context.Context, api *domain.Api) error {
54 if api == nil {
55 a.l.Warn("API不能为空")
56 return errors.New("api不能为空")
57 }
58
59 return a.repo.UpdateApi(ctx, api)
60}
61
62// DeleteApi 删除指定ID的API
63func (a *apiService) DeleteApi(ctx context.Context, id int) error {

Callers

nothing calls this directly

Calls 1

UpdateApiMethod · 0.65

Tested by

no test coverage detected