mirror of
https://github.com/fosrl/pangolin.git
synced 2025-07-29 15:14:56 +02:00
Get new api endpoints working
This commit is contained in:
parent
6e1bfdac58
commit
b1f4971f25
13 changed files with 79 additions and 51 deletions
|
@ -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
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue