add async
This commit is contained in:
parent
ca6e8b28de
commit
473828f498
|
@ -106,7 +106,7 @@ Future<void> _postOnMastodon(reqJson) async {
|
||||||
options: dio_lib.Options(headers: {'Authorization': 'Bearer $authToken'}));
|
options: dio_lib.Options(headers: {'Authorization': 'Bearer $authToken'}));
|
||||||
} else {
|
} else {
|
||||||
final mediaResponses = await Future.wait(
|
final mediaResponses = await Future.wait(
|
||||||
photoUrls.map((photoUrl) => dio.post('$instanceUrl/api/v1/media',
|
photoUrls.map((photoUrl) async => dio.post('$instanceUrl/api/v1/media',
|
||||||
data: dio_lib.FormData.fromMap({'file': File(photoUrl)}),
|
data: dio_lib.FormData.fromMap({'file': File(photoUrl)}),
|
||||||
options: dio_lib.Options(headers: {'Authorization': 'Bearer $authToken'}))));
|
options: dio_lib.Options(headers: {'Authorization': 'Bearer $authToken'}))));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue