Get new api endpoints working

This commit is contained in:
Owen 2025-02-21 16:12:21 -05:00
parent 6e1bfdac58
commit b1f4971f25
No known key found for this signature in database
GPG key ID: 8271FDFFD9E0CCBD
13 changed files with 79 additions and 51 deletions

View file

@ -10,8 +10,7 @@ import config from "@server/lib/config";
const inputSchema = z.object({
publicKey: z.string(),
endpoint: z.string(),
listenPort: z.number()
endpoint: z.string()
});
type Input = z.infer<typeof inputSchema>;
@ -20,6 +19,9 @@ export const handleGetConfigMessage: MessageHandler = async (context) => {
const { message, client, sendToClient } = context;
const newt = client as Newt;
logger.debug(JSON.stringify(message.data));
logger.debug("Handling Newt get config message!");
if (!newt) {
@ -99,8 +101,8 @@ export const handleGetConfigMessage: MessageHandler = async (context) => {
);
const configResponse = {
listenPort: site.listenPort, // ?????
// ipAddress: exitNode[0].address,
listenPort: site.listenPort,
ipAddress: site.address,
peers
};