correct api path

This commit is contained in:
Matthew R Kasun 2023-04-13 17:36:27 -04:00
parent 12004aa09a
commit 7d8aeb66c1

View file

@ -52,8 +52,8 @@ func DeleteRelay(hostID string) *models.ApiHost {
// RefreshKeys - refresh wireguard keys // RefreshKeys - refresh wireguard keys
func RefreshKeys(hostID string) any { func RefreshKeys(hostID string) any {
if hostID == "" { if hostID == "" {
return request[any](http.MethodPost, "/api/hosts/keys", nil) return request[any](http.MethodPut, "/api/hosts/keys", nil)
} }
return request[any](http.MethodPost, fmt.Sprintf("/api/hosts/%s/keys", hostID), nil) return request[any](http.MethodPut, fmt.Sprintf("/api/hosts/%s/keys", hostID), nil)
} }