wg-api
wg-api copied to clipboard
Call /peer/remove/username doesn't work
Hello!
I have found a small bug. I am able to create a peer, but I can't remove them afterwards. This is what I get;
root@server:~# curl http://x.x.x.x:3000/peer/create/removetest
{
"code": 200,
"profile": {
"Interface": {
"Address": "10.9.0.5/24",
"PrivateKey": "<hidden>",
"DNS": "1.1.1.1, 1.0.0.1"
},
"Peer": {
"PublicKey": "07G4gg98uYm0LNO+Xwon01zVnzWwFRFGTjxMJgP88AI=",
"AllowedIPs": "0.0.0.0/0, ::/0",
"Endpoint": "x.x.x.x:2000",
"PersistentKeepalive": "25"
},
"qr": "/peer/qr/removetest"
}
}root@server:~#
root@server:~# curl http://x.x.x.x:3000/peer/remove/removetest
{"message":"Route GET:/peer/remove/removetest not found","error":"Not Found","statusCode":404}root@server:~#
Further, very enthousiastic about this API, comes in useful!
Update: found it. Using '/client/remove/removetest' it does work. Minor error in the code then
Thanks @frykandelbroadsje! Will look into this.