Skip to content

Commit

Permalink
Use 200 as success code in SaveAlbum/SaveTracks/SaveShows, closes #496
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnnyCrazy committed Aug 27, 2020
1 parent 952d46f commit 8f17ee9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions SpotifyAPI.Web/Clients/LibraryClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,23 +95,23 @@ public async Task<bool> SaveAlbums(LibrarySaveAlbumsRequest request)
Ensure.ArgumentNotNull(request, nameof(request));

var statusCode = await API.Put(SpotifyUrls.LibraryAlbums(), request.BuildQueryParams(), null).ConfigureAwait(false);
return statusCode == HttpStatusCode.Created;
return statusCode == HttpStatusCode.OK;
}

public async Task<bool> SaveShows(LibrarySaveShowsRequest request)
{
Ensure.ArgumentNotNull(request, nameof(request));

var statusCode = await API.Put(SpotifyUrls.LibraryShows(), request.BuildQueryParams(), null).ConfigureAwait(false);
return statusCode == HttpStatusCode.Created;
return statusCode == HttpStatusCode.OK;
}

public async Task<bool> SaveTracks(LibrarySaveTracksRequest request)
{
Ensure.ArgumentNotNull(request, nameof(request));

var statusCode = await API.Put(SpotifyUrls.LibraryTracks(), request.BuildQueryParams(), null).ConfigureAwait(false);
return statusCode == HttpStatusCode.Created;
return statusCode == HttpStatusCode.OK;
}
}
}

0 comments on commit 8f17ee9

Please sign in to comment.