try posting

This commit is contained in:
Inex Code 2022-04-21 07:33:09 +00:00
parent 6bddb2e0b8
commit ec40134563

View file

@ -135,10 +135,10 @@ Future<void> _postOnMastodon(reqJson) async {
mediaIds.add(resp.data['id']); mediaIds.add(resp.data['id']);
} }
// var postResponse = await dio.post('$instanceUrl/api/v1/statuses', var postResponse = await dio.post('$instanceUrl/api/v1/statuses',
// data: {'status': postText, 'media_ids': mediaIds}, data: {'status': postText, 'media_ids': mediaIds},
// options: options:
// dio_lib.Options(headers: {'Authorization': 'Bearer $authToken'})); dio_lib.Options(headers: {'Authorization': 'Bearer $authToken'}));
await Future.wait(photoUrls.map((photoUrl) => File(photoUrl).delete())); await Future.wait(photoUrls.map((photoUrl) => File(photoUrl).delete()));
@ -165,13 +165,13 @@ Future<void> _postOnMastodon(reqJson) async {
mediaIds.add(resp.data['id']); mediaIds.add(resp.data['id']);
} }
// postResponse = await dio.post('$instanceUrl/api/v1/statuses', postResponse = await dio.post('$instanceUrl/api/v1/statuses',
// data: { data: {
// 'in_reply_to_id': postResponse.data['id'], 'in_reply_to_id': postResponse.data['id'],
// 'media_ids': mediaIds 'media_ids': mediaIds
// }, },
// options: options:
// dio_lib.Options(headers: {'Authorization': 'Bearer $authToken'})); dio_lib.Options(headers: {'Authorization': 'Bearer $authToken'}));
await Future.wait(photoUrls.map((photoUrl) => File(photoUrl).delete())); await Future.wait(photoUrls.map((photoUrl) => File(photoUrl).delete()));
} }