summaryrefslogtreecommitdiffhomepage
path: root/app/packages/function/src
diff options
context:
space:
mode:
Diffstat (limited to 'app/packages/function/src')
-rw-r--r--app/packages/function/src/api.ts13
1 files changed, 3 insertions, 10 deletions
diff --git a/app/packages/function/src/api.ts b/app/packages/function/src/api.ts
index d08eedb4a..2c84cd4f9 100644
--- a/app/packages/function/src/api.ts
+++ b/app/packages/function/src/api.ts
@@ -1,20 +1,16 @@
import { DurableObject } from "cloudflare:workers"
-import {
- DurableObjectNamespace,
- ExecutionContext,
-} from "@cloudflare/workers-types"
import { createHash } from "node:crypto"
import path from "node:path"
import { Resource } from "sst"
type Bindings = {
- SYNC_SERVER: DurableObjectNamespace<WebSocketHibernationServer>
+ SYNC_SERVER: DurableObjectNamespace
}
export class SyncServer extends DurableObject {
private files: Map<string, string> = new Map()
- constructor(ctx, env) {
+ constructor(ctx: DurableObjectState, env: Bindings) {
super(ctx, env)
this.ctx.blockConcurrencyWhile(async () => {
this.files = await this.ctx.storage.list()
@@ -38,10 +34,7 @@ export class SyncServer extends DurableObject {
})
}
- async webSocketMessage(ws, message) {
- if (message === "load_history") {
- }
- }
+ async webSocketMessage(ws, message) {}
async webSocketClose(ws, code, reason, wasClean) {
ws.close(code, "Durable Object is closing WebSocket")