|
@@ -174,7 +174,7 @@ class FileUploadApi extends BaseApi {
|
|
|
|
|
|
|
|
return shelf.Response.ok('File processed and uploaded successfully');
|
|
return shelf.Response.ok('File processed and uploaded successfully');
|
|
|
} catch (e, stackTrace) {
|
|
} catch (e, stackTrace) {
|
|
|
- print('Error: $e\n$stackTrace');
|
|
|
|
|
|
|
+ //print('Error: $e\n$stackTrace');
|
|
|
return shelf.Response.internalServerError(
|
|
return shelf.Response.internalServerError(
|
|
|
body: 'Error processing upload: $e');
|
|
body: 'Error processing upload: $e');
|
|
|
} finally {
|
|
} finally {
|
|
@@ -374,7 +374,9 @@ class FileProcess {
|
|
|
return data;
|
|
return data;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ List<String> get filesTomonitor => _headers.keys.toList();
|
|
|
Future<void> go() async {
|
|
Future<void> go() async {
|
|
|
|
|
+ if (!filesTomonitor.contains(filename)) return;
|
|
|
final mapsToInsert = await parseCsv();
|
|
final mapsToInsert = await parseCsv();
|
|
|
final scopeName = scopes[filename] ?? "";
|
|
final scopeName = scopes[filename] ?? "";
|
|
|
final scopeInNew = mapsToInsert
|
|
final scopeInNew = mapsToInsert
|