Skip to content

Commit

Permalink
Use a different sources endpoint to get the rhc connection info
Browse files Browse the repository at this point in the history
  • Loading branch information
dehort committed Jan 22, 2024
1 parent 8d951f0 commit 5475a32
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions internal/api/connectors/sources/impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func (this *sourcesClientImpl) getRHCConnectionStatus(ctx context.Context, sourc

ID := ID(sourceId)

res, err := this.client.GetRhcConnectionWithResponse(ctx, ID)
res, err := this.client.GetSourcesRhcConnectionWithResponse(ctx, ID, nil)

if err != nil {
return nil, err
Expand Down Expand Up @@ -133,13 +133,18 @@ func (this *sourcesClientImpl) GetSourceConnectionDetails(ctx context.Context, s
return SourceConnectionStatus{}, err
}

rhcConnectionResponse, err := this.getRHCConnectionStatus(ctx, sourceID)
fmt.Println("sourcesResponse: ", sourcesResponse)

source := (*sourcesResponse)[0]

rhcConnectionResponse, err := this.getRHCConnectionStatus(ctx, *source.Id)

Check failure on line 140 in internal/api/connectors/sources/impl.go

View workflow job for this annotation

GitHub Actions / lint

cannot use *source.Id (variable of type ID) as string value in argument to this.getRHCConnectionStatus (typecheck)

Check failure on line 140 in internal/api/connectors/sources/impl.go

View workflow job for this annotation

GitHub Actions / golang

cannot use *source.Id (variable of type ID) as type string in argument to this.getRHCConnectionStatus

if err != nil {
return SourceConnectionStatus{}, err
}

source := (*sourcesResponse)[0]
fmt.Println("rhcConnectionResponse: ", rhcConnectionResponse)

return SourceConnectionStatus{
ID: string(*source.Id),
SourceName: source.Name,
Expand Down

0 comments on commit 5475a32

Please sign in to comment.