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

Add password for backups #1892

Merged
merged 1 commit into from
Sep 17, 2024
Merged

Add password for backups #1892

merged 1 commit into from
Sep 17, 2024

Conversation

serjonya-trili
Copy link
Contributor

Proposed changes

Task link

Types of changes

  • Bugfix
  • New feature
  • Refactor
  • Breaking change
  • UI fix

Steps to reproduce

Screenshots

Add the screenshots of how the app used to look like and how it looks now

Before Now

Checklist

  • Tests that prove my fix is effective or that my feature works have been added
  • Documentation has been added (if appropriate)
  • Screenshots are added (if any UI changes have been made)
  • All TODOs have a corresponding task created (and the link is attached to it)

Copy link

vercel bot commented Sep 16, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
umami-v2-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 17, 2024 4:08pm
umami-v2-web-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 17, 2024 4:08pm

link.download = `UmamiV2Backup_${downloadedDate}.json`;

const currentDate = new Date().toISOString().slice(0, 10);
link.href = `data:text/json;chatset=utf-8,${encodeURIComponent(JSON.stringify(encryptedBackup))}`;
Copy link
Contributor

@OKendigelyan OKendigelyan Sep 16, 2024

Choose a reason for hiding this comment

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

typo in chatset=utf-8 => charset=utf-8

return restoreV2BackupFile(backup, password, persistor);
};

export const downloadBackupFile = async (password: string) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Would be nice to have unit tests for this function

@OKendigelyan
Copy link
Contributor

Checked manually, everything works as expected!

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.

2 participants