Fix: fetch has revalidate of 1 hour instead of 1 minutes like the route cache

This commit is contained in:
mbaharip
2024-05-29 15:55:39 +07:00
parent 9d27ae76bb
commit c3a524748e
+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;