Fix up ws messages

This commit is contained in:
Owen 2025-02-21 17:13:20 -05:00
parent 3830ad65fc
commit a0abe41c8a
No known key found for this signature in database
GPG key ID: 8271FDFFD9E0CCBD
2 changed files with 3 additions and 3 deletions

View file

@ -95,7 +95,7 @@ export const handleGetConfigMessage: MessageHandler = async (context) => {
clientsRes.map(async (client) => { clientsRes.map(async (client) => {
return { return {
publicKey: client.pubKey, publicKey: client.pubKey,
allowedIps: "0.0.0.0/0" // TODO: We should lock this down more allowedIps: ["0.0.0.0/0"] // TODO: We should lock this down more
}; };
}) })
); );
@ -112,7 +112,7 @@ export const handleGetConfigMessage: MessageHandler = async (context) => {
message: { message: {
type: "newt/wg/receive-config", // what to make the response type? type: "newt/wg/receive-config", // what to make the response type?
data: { data: {
config: configResponse ...configResponse
} }
}, },
broadcast: false, // Send to all clients broadcast: false, // Send to all clients

View file

@ -9,7 +9,7 @@ import {
targets targets
} from "@server/db/schema"; } from "@server/db/schema";
import { eq, and, sql } from "drizzle-orm"; import { eq, and, sql } from "drizzle-orm";
import { addPeer, deletePeer } from "../newt/peers"; import { addPeer, deletePeer } from "../gerbil/peers";
import logger from "@server/logger"; import logger from "@server/logger";
export const handleNewtRegisterMessage: MessageHandler = async (context) => { export const handleNewtRegisterMessage: MessageHandler = async (context) => {