jaredhendrickson13 / pfsense-api

The missing REST API package for pfSense
https://pfrest.org/
Apache License 2.0
672 stars 101 forks source link

Wireguard add Description Peer #534

Closed lapf10 closed 1 week ago

lapf10 commented 1 month ago

Hi,

First of all, congratulations on the superb work developed on this API, it will undoubtedly help a lot of people.

I'm just exploring the wireguard part and I think it would be interesting to have the possibility of adding the peer description and not requiring the Pre-shared Key as in the GUI

thanks,

jaredhendrickson13 commented 1 month ago

Looks like the description field was planned for the original release but was never implemented. Probably skipped over on accident. I'll make sure that's implemented in v2.1.0.

As for the presharedkey field, it is currently not a required field. You can exclude the field from the request data altogether or you can set the field to null to unset its current value.

lapf10 commented 3 weeks ago

Thanks for the reply I'll be waiting for the next update. Regarding the presharedkey, when you send null or exclude the request field, the API returns {"code":400,"status":"bad request","response_id":"FIELD_EMPTY_NOT_ALLOWED","message":"Fieldpresharedkeycannot be empty.","data":[]}

jaredhendrickson13 commented 3 weeks ago

Ah you're right, I see the issue. This warrants a separate issue so I've opened #541. Feel free to follow that issue for updates.

Thanks!