From 9b998716a6cd569cf85964966086a90f9dbf9c63 Mon Sep 17 00:00:00 2001 From: Ben Merckx Date: Tue, 14 Nov 2023 17:27:51 +0100 Subject: [PATCH] Tweak preview resolver --- src/backend/Handler.ts | 2 +- src/core/driver/NextDriver.server.tsx | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/backend/Handler.ts b/src/backend/Handler.ts index 45faf75fb..c6297275b 100644 --- a/src/backend/Handler.ts +++ b/src/backend/Handler.ts @@ -100,7 +100,7 @@ export class Handler { } async periodicSync() { - if (Date.now() - this.lastSync > 30_000) return + if (Date.now() - this.lastSync > 1_000) return try { await this.syncPending() } catch {} diff --git a/src/core/driver/NextDriver.server.tsx b/src/core/driver/NextDriver.server.tsx index 9e513928a..b64e25327 100644 --- a/src/core/driver/NextDriver.server.tsx +++ b/src/core/driver/NextDriver.server.tsx @@ -59,7 +59,11 @@ class NextDriver extends DefaultDriver implements NextApi { resolveDefaults }) const handler = await this.cloudHandler - return handler.resolver + return { + resolve(params) { + return handler.resolver.resolve({...resolveDefaults, ...params}) + } + } } backendHandler = async (request: Request) => {