Merge pull request #23 from mbahArip/v2

Fix: inconsistence cache between route and gdrive
This commit is contained in:
Arief Rachmawan
2024-05-29 16:02:30 +07:00
committed by GitHub
+6 -7
View File
@@ -43,18 +43,17 @@ if (!gdrive) {
gdrive = google.drive({
version: "v3",
auth: serviceAccountAuth,
fetchImplementation: (url, init) =>
fetch(url, {
...init,
next: {
revalidate: 3600,
},
}),
fetchImplementation: (url, init) => fetch(url, init),
});
}
export const gdriveNoCache = google.drive({
version: "v3",
auth: serviceAccountAuth,
fetchImplementation: (url, init) =>
fetch(url, {
...init,
cache: "no-store",
}),
});
export default gdrive as drive_v3.Drive;