client: Don't try to return an updated work

This commit is contained in:
Elias Projahn 2020-04-26 16:53:48 +02:00
parent 0fc0c933ac
commit c0cb41b8d0

View file

@ -83,14 +83,11 @@ class MusicusClient {
/// ///
/// The new or updated work is returned. /// The new or updated work is returned.
Future<void> putWork(WorkInfo workInfo) async { Future<void> putWork(WorkInfo workInfo) async {
final response = await _client.put( await _client.put(
'$host/works/${workInfo.work.id}', '$host/works/${workInfo.work.id}',
headers: {'Content-Type': 'application/json'}, headers: {'Content-Type': 'application/json'},
body: jsonEncode(workInfo.toJson()), body: jsonEncode(workInfo.toJson()),
); );
final json = jsonDecode(response.body);
return WorkInfo.fromJson(json);
} }
/// Get a list of all ensembles. /// Get a list of all ensembles.