Optimize requests

This commit is contained in:
Zef Hemel
2023-08-08 15:00:18 +02:00
parent 7498cc1ecb
commit b7b666ee1d
4 changed files with 34 additions and 13 deletions
+1 -2
View File
@@ -235,8 +235,7 @@ export class SyncService {
// Not present
}
try {
// This is wasteful, but Netlify (silverbullet.md) doesn't support OPTIONS call (404s) so we'll just fetch the whole file
remoteHash = (await this.remoteSpace!.readFile(name)).meta.lastModified;
remoteHash = (await this.remoteSpace!.getFileMeta(name)).lastModified;
} catch (e: any) {
if (e.message === "Not found") {
// File doesn't exist remotely, that's ok