(ctx context.Context, id uuid.UUID)
| 117 | } |
| 118 | |
| 119 | func (r *OrgInvitation) FindByID(ctx context.Context, id uuid.UUID) (*biz.OrgInvitation, error) { |
| 120 | ctx, span := otelx.Start(ctx, orgInvitationRepoTracer, "OrgInvitation.FindByID") |
| 121 | defer span.End() |
| 122 | |
| 123 | invite, err := r.query().Where(orginvitation.ID(id)).Only(ctx) |
| 124 | if err != nil && !ent.IsNotFound(err) { |
| 125 | return nil, fmt.Errorf("error finding invite %s: %w", id.String(), err) |
| 126 | } else if invite == nil { |
| 127 | return nil, nil |
| 128 | } |
| 129 | |
| 130 | return entInviteToBiz(invite), nil |
| 131 | } |
| 132 | |
| 133 | func (r *OrgInvitation) SoftDelete(ctx context.Context, id uuid.UUID) error { |
| 134 | ctx, span := otelx.Start(ctx, orgInvitationRepoTracer, "OrgInvitation.SoftDelete") |
no test coverage detected