refactor: Clean up code by removing unnecessary whitespace and improving readability

This commit is contained in:
Van Leemput Dayron
2025-11-05 07:55:05 +01:00
parent 9cb21c3470
commit 30dca05e15
8 changed files with 605 additions and 446 deletions

View File

@@ -1,32 +1,27 @@
import 'dart:io';
import '../lib/services/trip_image_service.dart';
import 'package:travel_mate/services/trip_image_service.dart';
/// Script utilitaire pour nettoyer les images inutilisées
/// À exécuter manuellement si nécessaire
void main() async {
try {
final tripImageService = TripImageService();
// Remplacez par votre ID utilisateur
// Vous pouvez le récupérer depuis Firebase Auth dans votre app
const userId = 'YOUR_USER_ID_HERE';
if (userId == 'YOUR_USER_ID_HERE') {
return;
}
final stats = await tripImageService.getImageStatistics(userId);
if (stats['tripsWithImages'] > 0) {
await tripImageService.cleanupUnusedImages(userId);
final newStats = await tripImageService.getImageStatistics(userId);
} else {
}
} else {}
} catch (e) {
exit(1);
}
@@ -42,4 +37,4 @@ Instructions d'utilisation:
4. Récupérez votre User ID affiché dans la console
5. Remplacez 'YOUR_USER_ID_HERE' par votre ID dans ce script
6. Exécutez: dart run scripts/cleanup_images.dart
*/
*/