Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zekisherif committed Oct 30, 2024
1 parent 959a1fa commit 5847ef5
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion api/resource_groups.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ package api

import (
_ "embed"
"encoding/json"
"fmt"
"time"

Expand Down Expand Up @@ -147,12 +148,21 @@ func (svc *ResourceGroupsService) Delete(guid string) error {
}

func (svc *ResourceGroupsService) Get(guid string, response interface{}) error {
var rawResponse ResourceGroupData
var rawResponse ResourceGroupResponse
err := svc.get(guid, &rawResponse)
if err != nil {
return err
}

j, err := json.Marshal(rawResponse)
if err != nil {
return err
}

err = json.Unmarshal(j, &response)
if err != nil {
return err
}
return nil
}

Expand Down

0 comments on commit 5847ef5

Please sign in to comment.