fix item property selection when getting drive items (#5077)

we already select these properties when paging drive items, we just missed the configuration on per-item GETs.

---

#### Does this PR need a docs update or release note?

- [x]  No

#### Type of change

- [x] 🐛 Bugfix

#### Test Plan

- [x]  Unit test
- [x] 💚 E2E
This commit is contained in:
Keepers 2024-01-20 23:43:27 -07:00 committed by GitHub
parent a6ec08375f
commit 89a6a76630
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -115,13 +115,20 @@ func (c Drives) GetItem(
ctx context.Context,
driveID, itemID string,
) (models.DriveItemable, error) {
options := &drives.ItemItemsDriveItemItemRequestBuilderGetRequestConfiguration{
QueryParameters: &drives.ItemItemsDriveItemItemRequestBuilderGetQueryParameters{
// FIXME: accept a CallConfig instead of hardcoding the select.
Select: DefaultDriveItemProps(),
},
}
di, err := c.Stable.
Client().
Drives().
ByDriveId(driveID).
Items().
ByDriveItemId(itemID).
Get(ctx, nil)
Get(ctx, options)
if err != nil {
return nil, graph.Wrap(ctx, err, "getting item")
}