cleanupPhotos method
Future<PhotoCleanupResult>
cleanupPhotos(
{ - String? authorization,
})
override
Implementation
@override
Future<PhotoCleanupResult> cleanupPhotos({String? authorization}) async {
final response = await _client.request(
method: 'POST',
path: '/dashboard/maintenance/cleanup-photos',
headers: {'authorization': authorization},
);
final _body = await response.transform(utf8.decoder).join();
if (jsonDecode(_body) case {'data': final Map data}) {
return PhotoCleanupResult.fromJson(Map.from((data as Map)));
}
throw Exception('Invalid response');
}