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

Method DeleteApi

internal/service/api.go:63–70  ·  view source on GitHub ↗

DeleteApi 删除指定ID的API

(ctx context.Context, id int)

Source from the content-addressed store, hash-verified

61
62// DeleteApi 删除指定ID的API
63func (a *apiService) DeleteApi(ctx context.Context, id int) error {
64 if id <= 0 {
65 a.l.Warn("API ID无效", zap.Int("ID", id))
66 return errors.New("api id无效")
67 }
68
69 return a.repo.DeleteApi(ctx, id)
70}
71
72// ListApis 分页获取API列表
73func (a *apiService) ListApis(ctx context.Context, page, pageSize int) ([]*domain.Api, int, error) {

Callers

nothing calls this directly

Calls 1

DeleteApiMethod · 0.65

Tested by

no test coverage detected