Skip to content

Commit

Permalink
chore: update google backup filename (#532)
Browse files Browse the repository at this point in the history
* Separate backup files for different wallets (seed-phrases)
  • Loading branch information
tadejpodrekar authored Dec 8, 2023
1 parent 5d6ae05 commit dece95c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/dapp/src/app/api/google/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ async function createDriveFile(
const mimeType = 'text/plain';
const fileMetadata = {
parents: ['appDataFolder'],
name: `${process.env.GOOGLE_DRIVE_FILE_NAME}${wallet}`,
name: `${process.env.GOOGLE_DRIVE_FILE_NAME}-${wallet}.txt`,
mimeType,
};
const media = {
Expand All @@ -54,7 +54,7 @@ async function createDriveFile(
async function getBackupFileId(drive: drive_v3.Drive, wallet: string) {
let id;
const list = await drive.files.list({
q: `name='${process.env.GOOGLE_DRIVE_FILE_NAME}${wallet}'`,
q: `name='${process.env.GOOGLE_DRIVE_FILE_NAME}-${wallet}.txt'`,
spaces: 'appDataFolder',
});

Expand Down Expand Up @@ -90,7 +90,7 @@ async function updateDriveFile(
return res;
}
const media = {
mimeType: 'text/plains',
mimeType: 'text/plain',
body: content,
};
const res = await drive.files.update({
Expand Down

0 comments on commit dece95c

Please sign in to comment.