Download data cloud func to second gen #306
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
CHECK THIS PR ONLY AFTERT update_cloud_functions_to_2nd_generation is merged to main
In this branch, I was updating the cloud function 'downloadData' to the second generation. This function generates statistics in an Excel file when the super admin presses to export data. The function to send these statistics via email hasn't worked for a while, and I decided not to fix it now because @covetous wasn't happy with SENDGRID and we might consider changing it.
For now, I have commented out the part that sends the Excel file via email and adapted the front end accordingly.
Now, when the super admin presses the "Export Data" button, it will run downloadDataSecondGen and then immediately show a button to download this statistic as the phone.