Skip to content

Commit

Permalink
Add await
Browse files Browse the repository at this point in the history
  • Loading branch information
wodndb committed Aug 11, 2023
1 parent 18aac2b commit 7eee31c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 14 deletions.
16 changes: 9 additions & 7 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -524984,13 +524984,15 @@ async function main() {
body: fs.createReadStream(path),
};

drive.files.create({
resource: fileMetadata,
media: fileData,
uploadType: "multipart",
fields: "id",
supportsAllDrives: true,
});
await drive.files
.create({
resource: fileMetadata,
media: fileData,
uploadType: "multipart",
fields: "id",
supportsAllDrives: true,
})
.finally();
}
}

Expand Down
16 changes: 9 additions & 7 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,15 @@ async function main() {
body: fs.createReadStream(path),
};

drive.files.create({
resource: fileMetadata,
media: fileData,
uploadType: "multipart",
fields: "id",
supportsAllDrives: true,
});
await drive.files
.create({
resource: fileMetadata,
media: fileData,
uploadType: "multipart",
fields: "id",
supportsAllDrives: true,
})
.finally();
}
}

Expand Down

0 comments on commit 7eee31c

Please sign in to comment.