mirror of
https://github.com/johrpan/musicus_mobile.git
synced 2025-10-26 10:47:25 +01:00
client: Don't try to return an updated work
This commit is contained in:
parent
0fc0c933ac
commit
c0cb41b8d0
1 changed files with 1 additions and 4 deletions
|
|
@ -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.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue