Skip to content

Commit

Permalink
Merge 7388dd0 into 53b9f9b
Browse files Browse the repository at this point in the history
  • Loading branch information
magnus-tretton37 committed Mar 19, 2019
2 parents 53b9f9b + 7388dd0 commit 8a2bfd6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/Castle.Sdk/CastleClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,10 @@ public async Task Track(ActionRequest request)
await SendTrackRequest(jsonRequest);
}

public async Task<DeviceList> GetDevicesForUser(string userId)
public async Task<DeviceList> GetDevicesForUser(string userId, string clientId = null)
{
return await TryRequest(() => _messageSender.Get<DeviceList>($"/v1/users/{userId}/devices"));
var clientIdQuery = string.IsNullOrEmpty(clientId) ? "" : $"?client_id={clientId}";
return await TryRequest(() => _messageSender.Get<DeviceList>($"/v1/users/{userId}/devices{clientIdQuery}"));
}

public async Task<Device> GetDevice(string deviceToken)
Expand Down
2 changes: 2 additions & 0 deletions src/Castle.Sdk/Messages/Responses/DeviceItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,7 @@ public class DeviceItem
public DateTime? MitigatedAt { get; set; }

public DeviceContext Context { get; set; }

public bool IsCurrentDevice { get; set; }
}
}
2 changes: 1 addition & 1 deletion src/pack_to_local_folder.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ if (Test-Path $packagePath) {
}

dotnet pack (Join-Path $PSScriptRoot "Castle.Sdk")
nuget add (Join-Path $PSScriptRoot Castle.Sdk\bin\Debug\Castle.Sdk.1.0.0.nupkg) -source $packages
nuget add (Join-Path $PSScriptRoot Castle.Sdk\bin\Debug\Castle.Sdk.1.0.1.nupkg) -source $packages
dotnet nuget locals all --clear

0 comments on commit 8a2bfd6

Please sign in to comment.