MCPcopy Create free account
hub / github.com/APIParkLab/APIPark / GetApprovalDetail

Method GetApprovalDetail

module/subscribe/iml.go:515–539  ·  view source on GitHub ↗
(ctx context.Context, pid string, id string)

Source from the content-addressed store, hash-verified

513}
514
515func (i *imlSubscribeApprovalModule) GetApprovalDetail(ctx context.Context, pid string, id string) (*subscribe_dto.Approval, error) {
516 _, err := i.projectService.Get(ctx, pid)
517 if err != nil {
518 return nil, err
519 }
520 item, err := i.subscribeApplyService.Get(ctx, id)
521 if err != nil {
522 return nil, err
523 }
524
525 return &subscribe_dto.Approval{
526 Id: item.Id,
527 Service: auto.UUID(item.Service),
528 Team: auto.UUID(item.Team),
529 Application: auto.UUID(item.Application),
530 ApplyTeam: auto.UUID(item.ApplyTeam),
531 ApplyTime: auto.TimeLabel(item.ApplyAt),
532 Applier: auto.UUID(item.Applier),
533 Approver: auto.UUID(item.Approver),
534 ApprovalTime: auto.TimeLabel(item.ApproveAt),
535 Reason: item.Reason,
536 Opinion: item.Opinion,
537 Status: item.Status,
538 }, nil
539}

Callers

nothing calls this directly

Calls 1

GetMethod · 0.65

Tested by

no test coverage detected