Skip to content

Commit

Permalink
Fix: OsuStatsApi getting all collections instead of just user ones
Browse files Browse the repository at this point in the history
  • Loading branch information
Piotrekol committed Jun 8, 2019
1 parent 2e5c992 commit 5b2a66c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public async Task<ICollection> GetCollection(int collectionId)
/// <returns></returns>
public async Task<IEnumerable<WebCollection>> GetMyCollectionList()
{
return await FetchCollectionList("collection?all=1");
return await FetchCollectionList($"collection?user={UserInformation.OsuUserId}&all=1");
}

public async Task<ICollection> GetCollection(string path)
Expand All @@ -189,7 +189,7 @@ public async Task<IEnumerable<WebCollection>> SaveCollection(ICollection collect
using (HttpContent osdbContent = new StreamContent(memoryStream))
using (MultipartFormDataContent httpContent = new MultipartFormDataContent())
{
httpContent.Add(osdbContent, "file",$"{collection.Name}.osdb");
httpContent.Add(osdbContent, "file", $"{collection.Name}.osdb");
var response = await httpClient.PostAsync($"{baseUrl}collection/import", httpContent);

return GetCollectionList(await response.Content.ReadAsStringAsync());
Expand Down

0 comments on commit 5b2a66c

Please sign in to comment.