Newt working

This commit is contained in:
Owen Schwartz
2024-11-23 16:28:50 -05:00
parent f9e0c33368
commit 0670d48ac7
7 changed files with 112 additions and 53 deletions

View File

@@ -43,9 +43,7 @@ export async function deletePeer(exitNodeId: number, publicKey: string) {
throw new Error(`Exit node with ID ${exitNodeId} is not reachable`);
}
try {
const response = await axios.delete(`${exitNode.reachableAt}/peer`, {
data: { publicKey } // Send public key in request body
});
const response = await axios.delete(`${exitNode.reachableAt}/peer?public_key=${encodeURIComponent(publicKey)}`);
logger.info('Peer deleted successfully:', response.data.status);
return response.data;
} catch (error) {