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

Method GetApp

module/service/iml.go:1396–1413  ·  view source on GitHub ↗
(ctx context.Context, appId string)

Source from the content-addressed store, hash-verified

1394}
1395
1396func (i *imlAppModule) GetApp(ctx context.Context, appId string) (*service_dto.App, error) {
1397 info, err := i.serviceService.Get(ctx, appId)
1398 if err != nil {
1399 return nil, err
1400 }
1401 if !info.AsApp {
1402 return nil, errors.New("not app")
1403 }
1404 return &service_dto.App{
1405 Id: info.Id,
1406 Name: info.Name,
1407 Description: info.Description,
1408 Team: auto.UUID(info.Team),
1409 CreateTime: auto.TimeLabel(info.CreateTime),
1410 UpdateTime: auto.TimeLabel(info.UpdateTime),
1411 AsApp: info.AsApp,
1412 }, nil
1413}
1414
1415func (i *imlAppModule) DeleteApp(ctx context.Context, appId string) error {
1416 info, err := i.serviceService.Get(ctx, appId)

Callers 2

CreateAppMethod · 0.95
UpdateAppMethod · 0.95

Calls 1

GetMethod · 0.65

Tested by

no test coverage detected