Skip to content

Commit

Permalink
Merge pull request #35 from rboy1/patch-2
Browse files Browse the repository at this point in the history
Getting a list of Installed app throws an error when used with multiple location
  • Loading branch information
daltskin authored Jan 31, 2022
2 parents 2225d27 + 9127c8b commit f5ec561
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions SmartThingsTerminal/API/SmartThingsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public PagedInstalledApps GetAllInstalledApps(string locationId = null)
{
if (locationId != null)
{
_allInstalledApps = _installedAppsApi.ListInstallations(locationId);
_allInstalledApps = _installedAppsApi.ListInstallations(_accessToken, locationId);
}
else
{
Expand All @@ -111,7 +111,7 @@ public PagedInstalledApps GetAllInstalledApps(string locationId = null)
{
foreach (var location in locations.Items)
{
var locationApps = _installedAppsApi.ListInstallations(location.LocationId.ToString());
var locationApps = _installedAppsApi.ListInstallations(_accessToken, location.LocationId.ToString());
if (locationApps.Items?.Count > 0)
{
_allInstalledApps.Items ??= new List<InstalledApp>();
Expand Down

0 comments on commit f5ec561

Please sign in to comment.