Use 200 as success code in SaveAlbum/SaveTracks/SaveShows, closes #496

This commit is contained in:
Jonas Dellinger 2020-08-27 14:07:49 +02:00
parent 952d46f58f
commit 8f17ee908c

View File

@ -95,7 +95,7 @@ namespace SpotifyAPI.Web
Ensure.ArgumentNotNull(request, nameof(request)); Ensure.ArgumentNotNull(request, nameof(request));
var statusCode = await API.Put(SpotifyUrls.LibraryAlbums(), request.BuildQueryParams(), null).ConfigureAwait(false); 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) public async Task<bool> SaveShows(LibrarySaveShowsRequest request)
@ -103,7 +103,7 @@ namespace SpotifyAPI.Web
Ensure.ArgumentNotNull(request, nameof(request)); Ensure.ArgumentNotNull(request, nameof(request));
var statusCode = await API.Put(SpotifyUrls.LibraryShows(), request.BuildQueryParams(), null).ConfigureAwait(false); 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) public async Task<bool> SaveTracks(LibrarySaveTracksRequest request)
@ -111,7 +111,7 @@ namespace SpotifyAPI.Web
Ensure.ArgumentNotNull(request, nameof(request)); Ensure.ArgumentNotNull(request, nameof(request));
var statusCode = await API.Put(SpotifyUrls.LibraryTracks(), request.BuildQueryParams(), null).ConfigureAwait(false); var statusCode = await API.Put(SpotifyUrls.LibraryTracks(), request.BuildQueryParams(), null).ConfigureAwait(false);
return statusCode == HttpStatusCode.Created; return statusCode == HttpStatusCode.OK;
} }
} }
} }