diff --git a/src/http.js b/src/http.js index b9dc4f1..a76ed56 100644 --- a/src/http.js +++ b/src/http.js @@ -14,7 +14,7 @@ function init(server, routes) { server.post(`/api/${iface}/${method}`, async (request) => { const { query, body, headers } = request; - const response = await handler({ ...query, ...body, headers }); + const response = await handler({ query, body, headers }); return response; }); } diff --git a/src/ws.js b/src/ws.js index d36c13a..6336ff4 100644 --- a/src/ws.js +++ b/src/ws.js @@ -15,7 +15,7 @@ function init(server, routes) { const handler = routes?.[name]?.[method]; if (!handler) - return connection.send('"Not found"', { binary: false }); + return connection.socet.send('"Not found"', { binary: false }); const result = await handler(...args); connection.send(JSON.stringify(result), { binary: false });