Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tweak(tupaiaWeb): RN-1383: Make raw data downloads use one time link #5848

Open
wants to merge 9 commits into
base: dev
Choose a base branch
from

Conversation

alexd-bes
Copy link
Contributor

@alexd-bes alexd-bes commented Aug 19, 2024

Issue RN-1383: Make raw data downloads use one time link

Changes:

  • Updated constructExportEmail to handle links to different platforms
  • Removed option for emailing attached data
  • Moved getTempDirectory and getExportPathForUser to server-utils
  • Make ExportSurveyDataHandler in web-config-server use same temp directory as everywhere else

const PLATFORM_SETTINGS = {
tupaia: {
url: requireEnv('TUPAIA_WEB_SERVER_API_URL'),
friendlyName: 'Tupaia',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the term friendlyName :)

const { error, filePath } = responseBody;
const { platform } = req.query;
const subject = 'Your export from Tupaia';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if the subject should change depending on the platform?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, good idea

@@ -28,13 +17,13 @@ type ResponseBody = {

type Req = {
query: {
emailExportFileMode?: EmailExportFileModes;
platform?: 'tupaia' | 'adminPanel' | 'datatrak';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should Lesmis be included as an option?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea

@alexd-bes alexd-bes requested a review from tcaiger August 30, 2024 03:46
@alexd-bes
Copy link
Contributor Author

@tcaiger are you able to re-review this one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants