Dax Raad 9 months ago
parent
commit
2e2bdd46b4
2 changed files with 2 additions and 2 deletions
  1. 1 1
      app/packages/function/src/api.ts
  2. 1 1
      js/src/share/share.ts

+ 1 - 1
app/packages/function/src/api.ts

@@ -35,7 +35,7 @@ export class SyncServer extends DurableObject {
     ws.close(code, "Durable Object is closing WebSocket")
     ws.close(code, "Durable Object is closing WebSocket")
   }
   }
 
 
-  async publish(key: string, content: string) {
+  async publish(key: string, content: any) {
     await this.ctx.storage.put(key, content)
     await this.ctx.storage.put(key, content)
 
 
     const clients = this.ctx.getWebSockets()
     const clients = this.ctx.getWebSockets()

+ 1 - 1
js/src/share/share.ts

@@ -33,7 +33,7 @@ export namespace Share {
               sessionID: sessionID,
               sessionID: sessionID,
               shareID: session.shareID,
               shareID: session.shareID,
               key: key,
               key: key,
-              content: JSON.stringify(content),
+              content,
             }),
             }),
           });
           });
         })
         })